[thelist] Multi-Part Forms

Chris W. Parker cparker at swatgear.com
Wed Jan 15 13:54:07 CST 2003


RUST Randal <mailto:RRust at COVANSYS.com> wrote:

> Erik Mattheis said:
>
> > The strategy I prefer for multi-page forms would be to
> > validate builderAdd1.php at the top of builderAdd2.php,
>
> Yes, I *could* do that, but here is why I don't want to.  I want to
> provide specific error messages for each field that has an error. So
> I have things like this:

you can do that. that's not a problem.

i do it like this... (in vbscript) (ultra-pseudo code)

<form ...>
<input ... name="myvar1" value="<%= myVar1 %>">
<span class="error"><%= errMyVar1 %></span>
<submit>
</form>

go to next page.
retrieve values and check them.
  they are not valid so we will redirecto the previous page...

firstpage.asp?errMyVar1=you+suck+try+again&myVar1=<whatever_they_entered
>

when firstpage.asp loads it will retrieve the value that was entered and
stick it in. it will also display the error message by retrieving it
from the query string.

chris.



More information about the thelist mailing list