Results 1 to 2 of 2

Thread: 2 Values for combo boxes

  1. #1
    Join Date
    Apr 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 2 Values for combo boxes

    Hi,

    Is it possible to be able to have 2 values associated with a combo box ?

    See example below:

    <select name="basket" onClick="compute(this.form)">
    <option value="">- Qty -</option>
    <option value="40">Roses</option>
    <option value="50">tulips</option>
    <option value="60">plant</option>
    <option value="70">bunch</option>
    </select>

    So what I am trying to do is that when you submit the form it sends out an email. But the result from the email for example will say:

    basket: 60 (if you choose plants - 60 been the dollar value which i need for further calculations in the form)

    Is there any way that you can have the text ie. Roses, tulips, etc sent along with the value (40, 50 etc) when you submit the form ?

    So something like: basket: plant, 60 appears

    I hope this makes sence.

    Regards
    Frogger

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Not a JS question.

    You need to look into coding your own form interpretation page with PHP.

    Or look into a better form interpreter if you're using a free one.

    However, you can't get the value you have unless it's the "name" or "value" item.
    So.... you could make it value="60" name="plant"... that would do something.


    But... seriously, why can't you just make it "60, plant" as the VALUE?

    Ex:
    value="60, plant"

    That's the really easy answer. Hope it works.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •