[ic] make dynamic variable name required to check out

Russ Mann interchange-users@interchange.redhat.com
Thu Mar 14 17:03:00 2002


Hello List,

Is there any way to make a dynamically generated filed name required to
check out?  For gift certificates, I'm using a field name:
emailto_[item-increment] to specify where a gift certificate is sent.  It
would be very nice to be able to REQUIRE this field.  The problem I have is
that sometimes there is no emailto_ anything field, and other times there
are multiple fields with different names.  Is there a way to require a field
to be an email address, only if that field exists?

Thanks,

Russell

-----Original Message-----
From: interchange-users-admin@interchange.redhat.com
[mailto:interchange-users-admin@interchange.redhat.com]On Behalf Of Russ
Mann
Sent: Monday, March 11, 2002 11:03 PM
To: Interchange-Users
Subject: [ic] gift certificate require email address


Hello List,

Below is my code in checkout.html in the [item-list] section.  What I want
to do is require users to enter a valid email address if they have ordered a
gift certificate.  How can I set this up?  It would be requiring a field
which has a variable name - emailto_1, maybe emailto_2 ... ad infinitum.

I tried to use the "required=1" in an [error] label (as you can see), but
that doesn't seem to do it.  Using IC 4.8.3.

Thank you,

Russ Mann


[if-item-field gift_cert]
<tr bgcolor="[item-alternate
2]#eeeeee[else]#c0c0c0[/else][/item-alternate]">
<td colspan="5" align="left">
<font __FFACE__ size="1" ><b>[error name=emailto_[item-increment]
std_label="E-Mail Gift Certificate To" required=1]:</b></font>
&nbsp;
[if !value emailto_[item-increment]][value name=emailto_[item-increment]
set="Not Set" hide=1][/if]
<input type="text" name="emailto_[item-increment]" value="[value
emailto_[item-increment]]" size="30">
</td></tr>
[/if-item-field]

_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users