[ic] form validation - simplest possible

Jeff Dafoe interchange-users@icdevgroup.org
Tue Nov 19 18:46:01 2002


Hello,

    I am not able to get form validation functioning on a page that doesn't
relate to checkout.  I have reviewed every message with regards to form
validation and have tried ten zillion combinations of mv_todo and mv_doit
with no luck.  I have prepared the world's simplest interchange page,
included below, in order to facilitate my tentative instruction in the ways
of interchange form validation.  After reviewing numerous messages in the
archives, I am led to believe that the code below should work.  As opposed
to the results it generates now, which is the error page with "Sorry, the
page () was not found ", regardless of whether or not anything is entered in
the text field.
    Assuming that it is possible to get the code below working, I think it
will make a good item for the FAQ, since it's about as generic as form
validation could possibly be.

=====
<html>
<body>
<form action="[process]" method="POST">
<input type=hidden name="mv_session_id" value="[data session id]">
[error name=textfield std_label="Generic Textfield" required=1]
<input type=text name="textfield"><br>
[button name="mv_click" value="continue"]
</form>
</body>
</html>

[set validate]
 &success=index
 &fail=@@MV_PAGE@@
 textfield=required
 &fatal=1
[/set]

[set continue]
 mv_todo=return
 mv_form_profile=validate
[/set]
=====


Thanks,
Jeff