Community Forums 

Main Content

multiple forms per page

    Nov 17 2010 18:32:23

    #1

    MB

    Join date : 2008-09-18      Posts : 56

    I am having some difficulty setting up multiple forms on a single page. The following code does not seem to work properly. I'm quite sure it's my unfamiliarity with forms. Thank you in avance.

    <form action="http://ww6.aitsafe.com/cf/add.cfm"; method="post" name="form1">
    <input type="hidden" name="product" value="Style BG01" />
    <input type="hidden" name="userid" value="8021228" />
    <input type="hidden" name="return" value="www.mydomain.com/test1.html"; />
    <input type="hidden" name="discountpr" value="1,8:1,7.5:9,7.25:18,7:0,6.75" />
    <table>
    <tr>
    <td><input name="qty1" type="text" id="qty1" value="" size="2" class="box" /></td>
    <td><input type="submit" value="Buy Now"/></td>
    </tr>
    </table>
    </form>



    <form action="http://ww6.aitsafe.com/cf/add.cfm"; method="post" name="form2">
    <input type="hidden" name="product" value="Style BG02" />
    <input type="hidden" name="userid" value="8021228" />
    <input type="hidden" name="return" value="www.mydomain.com/test1.html"; />
    <input type="hidden" name="discountpr" value="1,8:1,7.5:9,7.25:18,7:0,6.75" />
    <table>
    <tr>
    <td><input name="qty2" type="text" id="qty2" value="" size="2" class="box" /></td>
    <td><input type="submit" value="Buy Now"/></td>
    </tr>
    </table>
    </form>



    Nov 17 2010 19:13:59

    #2

    Debbie Q

    Join date : 2008-09-18      Posts : 4994

    You have 2 forms but they are not addmulti forms. remove the product numbers from both the qty tags and just use qty.

    <td><input name="qty" type="text" id="qty1" value="" size="2" class="box" /></td>

    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.




    Nov 17 2010 19:33:01

    #3

    MB

    Join date : 2008-09-18      Posts : 56

    Thanks Debbie, that works nicely. I would love to use an addmulti form but I have not found any samples of how to set this up using discountpr. I have only seen samples with price. If I could, I would love to see how to use addmulti with a different set of values in discountpr for each item. Thanks so much.



    Nov 17 2010 21:36:46

    #4

    GT

    Join date : 2008-09-18      Posts : 3207

    If you only have one product, then as Debbie has suggested, you don't need to use qty1, qty2.....

    If you have different products with different discounts per form, then you would use discountpr1, qty1 - discountpr2, qty2 in the same form.

    For different forms, you'd use exactly the same.... As they are separate forms even though they might be on the same page.

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

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




    Nov 17 2010 22:06:24

    #5

    MB

    Join date : 2008-09-18      Posts : 56

    Thanks GT, I will try that out.

    Are forms almost limitless with what you can do? For example, if I figure out addmulti with discountpr, can I also add personalization to one of the products in the form and not offer it for all products?



    Nov 17 2010 22:29:52

    #6

    MB

    Join date : 2008-09-18      Posts : 56

    Follow up to the limitless idea question . . . I now think I have addmulti working well with discountpr. I would like to add a minimum quantity to this form set. I do use Graham's minimum script for some products, can I successfully apply it to a form set like this?



    Nov 18 2010 07:20:38

    #7

    GT

    Join date : 2008-09-18      Posts : 3207

    Are you attempting to offer a discount over the total ordered from the page or, a discount per product?

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

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