Community Forums 

Main Content

Re:Force selection with multiple items on page

    Oct 05 2012 15:42:53

    #1

    Claire

    Join date : 2008-11-08      Posts : 90

    Thank you GT - going to go give it a try now.

    Agree - keeping user on page after adding an item to cart dosn't always make sense.

    Will report back later - hopefully sooner than later ;)

    Much appreciated!



    GT said In the script, you have these lines:

    if(F.elements["qty1"].options[F.elements["qty1"].options.selectedIndex].value == '')
    {
    result += warn[0];
    }

    if(F.elements["product1"].options[F.elements["product1"].options.selectedIndex].value == '')
    {
    result += warn[1];
    }

    ***********************
    If you wish to use other products on the same page using the same form, then simply add to the script:

    if(F.elements["qty2"].options[F.elements["qty2"].options.selectedIndex].value == '')
    {
    result += warn[0];
    }

    if(F.elements["product2"].options[F.elements["product2"].options.selectedIndex].value == '')
    {
    result += warn[1];
    }

    etc
    etc

    I'm not sure why you would want to keep the buyer on the same page after they had made all of their chosen selections, but if you do, you could use this:
    http://www.malsforms.com/send-to-cart.html

    ----
    Claire Walters Design Studios