[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] form validation revisited
>> 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
Cool.. thanks! Between the two of us we got it to work. That's how
mailing lists are supposed to work. I'll post a short HOWTO just so it
is there next time I need it. Maybe it will help someone else too.
The only other thing I'd like to add is a check on the email address to
make sure it in a valid format. I'm always shocked at how many people
enter stuff like "luser@AOL" in an email field. Maybe someone can post
code to do that ?
DB