View Full Version : disable a hidden input

08-21-2010, 08:40 AM
does anyone know how i would disable hidden fields based on a radio button

i have 2 radio buttons
1-send to me
2-send to someone else

2 opens up text boxes and hidden fields in a div box

What i want is when 1 is selected it does not pass the hidden fields or text boxes to the next page.

08-21-2010, 08:53 AM
here is the code
trying to get the customer info (including hidden fields)not to go to the shopping cart when they choose SEND CERT TO ME TO GIVE TO RECIPANT

<span class="style30" style="text-align:center">Send directly to recipant:</span><input name="product3[]" type="radio" value="{br}{b}SEND CERT DIRECTLY TO RECIPANT---{/b}" onclick="toggle(this, 'shipGroup');"/><br/>
<span class="style30">Send to me to give to the recipant:</span>
<input name="product3[]" type="radio" value="{br}{b}SEND CERT TO ME TO GIVE TO RECIPANT---{/b}" /></center>
<input type="hidden" name="price3" value=".00" />
<input type="hidden" name="qty3" value="1" />
<input type="hidden" name="noqty3" value="3" />
<div id="shipGroup"><table width="616">
<td width="125" style="text-align:left">
<span class="style30">First Name</span>
<input type="hidden" name="product3[]1" value="{br}FIRST NAME:" /></td>
<td width="151"><input type="text" name="product3[]2" value=""/></td>
<td width="147" style="text-align:right"><span class="style30" >Last Name</span>
<input type="hidden" name="product3[]3" value="{br}LAST NAME:" /></td>
<td width="173" style="text-align:left"><input type="text" name="product3[]4" value=""/></td></tr>
<tr><td colspan="3" style="text-align:left"><span class="style30">Address</span>
<input type="hidden" name="product3[]5" value="{br}ADDRESS:" />
<input type="text" name="product3[]6" value="" size="30"/></td>
<tr><td colspan="2" style="text-align:left"><span class="style30">City</span>
<input type="hidden" name="product3[]7" value="{br}CITY:" /><input type="text" name="product3[]8" value=""/></td>
<td><span class="style30">State</span>
<input type="hidden" name="product3[]9" value="{br}STATE:" />
<input type="text" name="product3[]10" value="" size="10"/></td>
<td><span class="style30">Zip code</span>
<input type="hidden" name="product3[]11" value="{br}ZIP CODE:" />
<input type="text" name="product3[]12" value="" size="5"/></td></tr></table>

08-21-2010, 09:37 PM
If the hidden fields are not needed on the next page if 1 is selected, why does it matter if they're passed or not?

08-22-2010, 12:53 AM
They post in the shopping cart as labels for the gift cert.