Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2008
    Posts
    67
    Thanks
    18
    Thanked 0 Times in 0 Posts

    disable a hidden input

    does anyone know how i would disable hidden fields based on a radio button

    example
    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.

  • #2
    New Coder
    Join Date
    Jun 2008
    Posts
    67
    Thanks
    18
    Thanked 0 Times in 0 Posts
    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

    Code:
    <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/>
    <center>
      <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">
    <tr>
    <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>
      <td>&nbsp;</td>
      </tr>
    <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>

  • #3
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    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?

  • #4
    New Coder
    Join Date
    Jun 2008
    Posts
    67
    Thanks
    18
    Thanked 0 Times in 0 Posts
    They post in the shopping cart as labels for the gift cert.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •