Community Forums 

Main Content

hidden elements

    Mar 04 2010 18:45:23

    #1

    howard

    Join date : 2008-09-18      Posts : 10

    I am using a hidden element to pass a label to my cart. It is attached to a text box.
    Is there a way that when the customer does not choose that item it does not pass. the same thing with check box if they choose it or not they seem to go to the cart anyway.

    <span class="style30">First Name</span>
    <input type="hidden" name="product3[]" value="{br}FIRST NAME:" />
    <input type="text" name="product3[]" value=""/>
    <span class="style30">Last Name</span>
    <input type="hidden" name="product3[]" value="{br}LAST NAME:" />
    <input type="text" name="product3[]" value=""/><br/>
    <span class="style30">Address</span>
    <input type="hidden" name="product3[]" value="{br}ADDRESS:" />
    <input type="text" name="product3[]" value=""/><br/>


    <input type="checkbox" name="product2[]" value="{b}MESSAGE CARD---{/b}" onselect="document.form1.price1[].value+document.form1.price2[].value" onclick=" toggle(this, 'cardGroup1')"/>

    <span class="style30">Add a message card </span>
    <input type="hidden" name="price2" value=".55" />
    <input type="hidden" name="qty2" value="1" />
    <input type="hidden" name="noqty2" value="3" />



    Mar 04 2010 20:20:12

    #2

    GT

    Join date : 2008-09-18      Posts : 3207

    Why not place the checkbox in a hidden div?

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.




    Mar 04 2010 20:36:39

    #3

    howard

    Join date : 2008-09-18      Posts : 10

    GT said Why not place the checkbox in a hidden div?

    cause the check box opens or hides the div box with all the other text boxes
    but i will try it



    Mar 04 2010 21:26:38

    #4

    Debbie Q

    Join date : 2008-09-18      Posts : 4994

    Instead of making your checkbox be the description line why not make the checkbox be the qty2? If not checked nothing will be entered into the cart.

    Debbie Q

    Mal's Support: www.mals-e.com/support.php
    GT's Forms and examples: www.malsforms.com
    Helpful java scripts: www.gemasana.com/mals
    Shipping help documents: www.stoner.org.uk/mals

    My Create-A-Book Publishing - mycreateabook.com
    Personalized Books, Music CDs and Gifts for all ages and occasions.

    Please help me out and share my site on your networks.




    Mar 05 2010 00:00:51

    #5

    howard

    Join date : 2008-09-18      Posts : 10

    don't understand can you explain in more detail

    <hr color="#FFFF00"/>
    <p><span class="style30">Send directly to recipant:</span><input name="product3[]" type="checkbox" value="{br}{b}SEND CERT DIRECTLY TO RECIPANT---{/b}" onclick="toggle(this, 'shipGroup');"/><br/>
    <center><span class="style30">Send to me to give to recipant:</span>
    <input name="product3[]" type="checkbox" value="{br}{b}SEND CERT TO ME TO GIVE TO RECIPANT---{/b}" /></center></P>
    <input type="hidden" name="price3" value=".00" />
    <input type="hidden" name="qty3" value="1" />
    <input type="hidden" name="noqty3" value="3" />
    <p><div id="shipGroup" align="left">
    <span class="style30">First Name</span>
    <input type="hidden" name="product3[]" value="{br}FIRST NAME:" />
    <input type="text" name="product3[]" value=""/>
    <span class="style30">Last Name</span>
    <input type="hidden" name="product3[]" value="{br}LAST NAME:" />
    <input type="text" name="product3[]" value=""/><br/>
    <span class="style30">Address</span>
    <input type="hidden" name="product3[]" value="{br}ADDRESS:" />
    <input type="text" name="product3[]" value=""/><br/>
    <span class="style30">City</span>
    <input type="hidden" name="product3[]" value="{br}CITY:" />
    <input type="text" name="product3[]" value=""/><br/>
    <span class="style30">State</span>
    <input type="hidden" name="product3[]" value="{br}STATE:" />
    <input type="text" name="product3[]" value="" size="10"/>
    <span class="style30">Zip code</span>
    <input type="hidden" name="product3[]" value="{br}ZIP CODE:" />
    <input type="text" name="product3[]" value="" size="5"/><br/>



    Mar 05 2010 15:48:19

    #6

    Debbie Q

    Join date : 2008-09-18      Posts : 4994

    <input name="qty3" type="checkbox" value="1" onclick="toggle(this, 'shipGroup');"/> and remove the hidden qty3 field. And then leave off the "send certificate to me" or connect it to the main product.

    Debbie Q

    Mal's Support: www.mals-e.com/support.php
    GT's Forms and examples: www.malsforms.com
    Helpful java scripts: www.gemasana.com/mals
    Shipping help documents: www.stoner.org.uk/mals

    My Create-A-Book Publishing - mycreateabook.com
    Personalized Books, Music CDs and Gifts for all ages and occasions.

    Please help me out and share my site on your networks.