Community Forums 

Main Content

Specify the order that form fields appear in cart

    Mar 12 2009 11:53:54

    #1

    Sofabed Gallery Ltd

    Join date : 2008-09-18      Posts : 25

    Hi Guys,

    I have a slight problem. I am using a combination of "productpr" and "product" on one form. I want the product field to appear first in the cart, followed by the productpr field. By default it shows the productpr field first. Here is a sample of my code :
    <input type="hidden" name="userid" value="9437628">
    <input type="hidden" name="product" value=" Chili chair set">
    <input type="hidden" name="return" value="www.sofabedgallery.co.uk/scripts/cart.php">;
    <span class="ariel12black">Finish / colour : </span>
    <select name="productpr">
    <option selected value="ERROR - Please select fabric">please select</option>
    <option value="Red fabric:449">red fabric</option>
    <option value="Rosso fabric:549">rosso fabric</option>

    </select>

    Can anyone help with how to make the product field show first ? I have tried all sorts but with no luck....
    Thanks.



    Mar 12 2009 12:47:18

    #2

    Geoff

    Join date : 2008-09-18      Posts : 415

    Why not just add the product description to each option, for example -

    <option value="Chili chair set - Red fabric:449">red fabric</option>
    <option value="Chili chair set - Rosso fabric:549">rosso fabric</option>



    Mar 12 2009 15:39:56

    #3

    Chris

    Join date : 2008-09-18      Posts : 25

    Hi Geoff,

    Thanks for your input. The code shown is a compressed version as the real code has @ 30 option lines which would mean adding 'chili chair set' to every option line. Using a product line for the form allows this line to be automatically added to every option which makes the job of code writing much easier.
    Any thoughts anyone ?



    Mar 12 2009 16:11:25

    #4

    Debbie Q

    Join date : 2008-09-18      Posts : 4994

    I believe Geoff's solution is the only way.

    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.