guestbook: problem with adding new messages
Posted: Tue Feb 20, 2007 10:51 pm
hi, i have guestbook 1.1.8 and cmsmadesimple 1.0.2, my guestbook can be found there http://martin.houra.cz/xxx/index.php?page=diskuse ( be free to test it )
guestbook template
content
rest is similar to default
all i want is to show my form always, even after i add new message. so i changed this from FALSE to TRUE on line 120 of action.default.php
and added this to line 185 of the same file ( or similar line as dee described it here http://forum.cmsmadesimple.org/index.php/topic,8366.0.html ) to reset the inputs values
anyway, when i add new message, everything works quite good..but when i want to add another message without refreshing page, i get a "Your message was already sent" error and whole form disappears ( or without a @ symbol in email address, i get no error and whole form disappears too ), of course nothing is added
so .. do you have any ideas what to do about it ? thanks a lot
guestbook template
Code: Select all
<div class="cms-guestbook">
{if $show_insertbutton}
{$insertbutton}
{/if}
{if $show_errors}
{foreach from=$errors item=error}
<br /><span style="font-weight:bold;color:red">{$error}</span>
{/foreach}
{/if}
<br />
{$form}
{if $show_smileys}
{$smileys}
{/if}
{if $show_msg}
<br /><br /><strong>{$msg}</strong>
{/if}
{if $show_entries}
{$entrylist}
{/if}
</div>
Code: Select all
{cms_module module="Guestbook" number="10" shownow="1" sortasc="0" smiley="0" showaddform="1" lang="en_EN" dateformat="d. m. Y"}
all i want is to show my form always, even after i add new message. so i changed this from FALSE to TRUE on line 120 of action.default.php
Code: Select all
$frontend->setShowForm(FALSE);
Code: Select all
$_POST['sender'] = '';
$_POST['homepage'] = '';
$_POST['message'] = '';
$_POST['country'] = '';
$_POST['location'] = '';
$_POST['e_mail'] = '';
so .. do you have any ideas what to do about it ? thanks a lot