[ic] form validation AND adding to cart

Grant interchange-users@icdevgroup.org
Sat Feb 8 20:45:02 2003


I have a form with two text fields.  I'm trying to get the sku entered in
the first text field added to the cart, but also have the form run through
an order profile to make sure the two fields are filled out.  I can get the
sku added to the cart just fine, but I can't get the form validation to
work.  Here's my form:

<form action="[process-target]" method="post">
<input type="hidden" name="mv_order_profile" value="auction">
<input type="hidden" name="mv_todo" value="refresh">
<input type="hidden" name="mv_nextpage value="ord/basket">
<input type="hidden" name="mv_session_id" value="[data session id]">
<input type="hidden" name="mv_order_quantity" value="1">
<input type="text" size="7" maxlength="7" name="mv_order_item" value="">
<input type="text" size="12" maxlength="12" name="auction_number" value="">
<input type="submit" value="Submit">

and here's the "auction" order profile in the profiles.order file:

__NAME__                        auction
mv_order_item=required Please enter your item's SKU.
auction_number=required Please enter your item's auction number.

&fatal=yes

__END__

Can anyone give me some pointers here?  I've been through the docs and
mailing list.

- Grant