[ic] form validation revisited

Jeff Dafoe interchange-users@icdevgroup.org
Mon Nov 25 09:53:00 2002


> But here's a demo form that does indeed validate. Be sure to clearly
> mark the required fields. I hope someone posts a better way!

Thanks for your help!  The problem for me was that I needed to add:

    <input type=hidden name="mv_doit" value="return">

to the HTML.  I am not sure why, I thought that the button tag generated a
mv_click by default, and I was setting mv_doit=return in the mv_click block.
Now I wonder if my mv_click code was ever getting called, I'll bet I am
using the button tag wrong somehow.

But now to help you:

[error name=email std_label="*Email:" required=1]:
<INPUT MAXLENGTH=30 NAME=email type=text size=15 value="[value email]"><br>

Replace your email input code with the code shown above and you will get an
error message in red when the validation fails.  You can also put the
following at the top of your page and it will display the error message
also.

    [error all=1 keep=1 show_error=1 show_label=1 joiner="<br>"]

That will allow you to have an error message at the top of the page and then
also red error text next to the field in question.



Jeff