Unfortunately, I can't get it to work. I studied the example presented on the website, with no luck so far. The client-side validation works great, but if I disable javascript, nothing happens. The form is submitted and no error message appears.
Here is the template I use:
....
<fs:form name="testf" action="" method="post">
<fs:input name="text1" type="text" />
<fs:validate field="text1" check="empty" message="You have to type a text in Text field" />
<fs:ifErrormessage field="text1">
<fs:errormessage field="text1" />
</fs:ifErrormessage>
</fs:form>
....
=========================
Unfortunately, I can't get it to work. I studied the example presented on the website, with no luck so far. The client-side validation works great, but if I disable javascript, nothing happens. The form is submitted and no error message appears.
Here is the template I use:
....
<fs:form name="testf" action="" method="post">
<fs:input name="text1" type="text" />
<fs:validate field="text1" check="empty" message="You have to type a text in Text field" />
<fs:ifErrormessage field="text1">
<fs:errormessage field="text1" />
</fs:ifErrormessage>
</fs:form>
....
=========================
And the script:
....
$tpl = &new Smarty_formsess();
$tpl->fs_root = ".......";
$tpl->enableFormsess();
$fs = &new formsess("testf");
if (is_array($_POST))
{
$fs->performCheck();
}
$tpl->display("testform.tpl");
.....
=========================
Maybe i got it wrong...
Any help would be appreciated
Alin
Bonjour,
you should make sure that you start your session on both pages. Do you really have got this action="" ?
hth, janosch.
Yes, the session is started, but still no luck.
action="" sends the data back to the originating page.
Thanks,
Alin
Indeed, starting the session made it work. I didn't realize it the first time.
Thanks a lot janosch,
Alin