Community Forums 

Main Content

Re:Remove Recalculate Button?

    Jun 07 2012 11:06:02



    Join date : 2012-06-07      Posts : 5

    GT said The syntax of: 'noqty=1' puts a qty number in the cart, 'noqty=2' puts a checkbox so the item can be removed and 'noqty=3' puts a checkbox and a number. With all of these, you should have a syntax of 'qty=number' to send the value to the cart.

    Many thanks was struggling (with the multi form) For anyone else trying to something similar I came up with the following which seems to work ok. If it is wrong let me know (Please!)

    <form action=""; method="post" onsubmit="if(this.qty1.value&gt;2){alert('Maximum of 2 please');this.qty1.value=2;return false;}; if(this.qty2.value&gt;2){alert('Maximum of 2 please');this.qty2.value=2;return false;}; if(this.qty3.value&gt;2){alert('Maximum of 2 please');this.qty3.value=2;return false;}; if(this.qty4.value&gt;2){alert('Maximum of 2 please');this.qty4.value=2;return false;}">
    <p><input type="hidden" name="userid" value="xxxxxxxxx" />

    <input type="hidden" name="product1" value="Ticket 1" />
    <input type="hidden" name="price1" value="10.00" />
    <input type="hidden" name="noqty1" value="1">
    <input type="text" name="qty1" size="1" />
    Ticket 1 - 10 Euro
    <input type="hidden" name="product2" value="Ticket 2" />
    <input type="hidden" name="price2" value="20.00" />
    <input type="hidden" name="noqty2" value="1">
    <input type="text" name="qty2" size="1" />
    Ticket 2 - 20 Euro

    <input type="hidden" name="product3" value="Ticket 3" />
    <input type="hidden" name="price3" value="25.00" />
    <input type="hidden" name="noqty3" value="1">
    <input type="text" name="qty3" size="1" />
    Ticket 3 - 25 Euro

    <input type="hidden" name="product4" value="Ticket 4" />
    <input type="hidden" name="price4" value="15.00" />
    <input type="hidden" name="noqty4" value="1">
    <input type="text" name="qty4" size="1" />
    Ticket 4 - 15 Euro
    <input type="submit" value="Buy Tickets" />