Community Forums 

Main Content

Is this possible

    May 08 2010 05:36:34

    #1

    pcguy

    Join date : 2008-09-18      Posts : 130

    I have a form that automatically adds up computer parts etc and uses checkboxes and you can only select 1 checkbox in a group at a time, everything works very well but I want to condense the scipting down a little.

    Looking at this part of my script below is there a way to incorporate the qty fields into the end of the laptop and bag fields so I can do away with the qty section altogether.

    <!---- LAPTOP SECTION ------>

    <input type="hidden" id="txt_laptop_1" name="price1" value="623.15">
    <input type="hidden" id="txt_laptop_2" name="price2" value="1186.57">
    <input type="hidden" id="txt_laptop_3" name="price3" value="1157.97">
    <input type="hidden" id="txt_laptop_4" name="price4" value="1129.37">
    <input type="hidden" id="txt_laptop_5" name="price5" value="871.97">

    <!---- BAG SECTION --------->

    <input type="hidden" id="txt_bag_1" name="price6" value="45.00"">
    <input type="hidden" id="txt_bag_2" name="price7" value="45.00">
    <input type="hidden" id="txt_bag_3" name="price8" value="45.00">
    <input type="hidden" id="txt_bag_4" name="price9" value="45.00">
    <input type="hidden" id="txt_bag_5" name="price10" value="45.00">


    <!---- QTY SECTION --------->

    <input type="hidden" name="qty1" value="1">
    <input type="hidden" name="qty2" value="1">
    <input type="hidden" name="qty3" value="1">
    <input type="hidden" name="qty4" value="1">
    <input type="hidden" name="qty5" value="1">
    <input type="hidden" name="qty6" value="1">
    <input type="hidden" name="qty7" value="1">
    <input type="hidden" name="qty8" value="1">
    <input type="hidden" name="qty9" value="1">
    <input type="hidden" name="qty10" value="1">