Results 1 to 2 of 2

Thread: Help with Chained Select Menu

  1. #1
    Join Date
    May 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Help with Chained Select Menu

    This question is about the Chained Select Menu script found here:

    http://www.dynamicdrive.com/dynamici...ainedmenu.html

    I'm using this and I want to send the options selected in the various dropdowns all summarized in an email. I have set up the configuration correctly, however the "option text" is different from "option value" (as it should be).

    Here's an excerpt of the config file:

    addList("cs-top", "for publication", "1", "cs-sub-1");
    addOption("cs-sub-1", "Advertising", "3", 1);


    Everything works but when I submit the form, what I get in the email is only the "option value". For example, in case of the excerpt above, I only get "3" in the email. What I want is "Advertising", which is the option text, to be sent in the email as well so that when I submit the form, I get an email saying

    Advertising 3

    How do I access the option text values?

    Sorry if this isn't clear.

    Thanks.

  2. #2
    Join Date
    May 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I emailed the script developer last night and he suggested just appending the option text to the option value field. Duh! Why didn't I think of that

    so following my example, I would have:

    addList("cs-top", "for publication", "1", "cs-sub-1");
    addOption("cs-sub-1", "Advertising", "Advertising 3", 1);

    Then if you need to separate it when you send to the server (e.g. in php so I can do other stuff like calculate some stuff), I just split the string into two: "Advertising" and "3".

    Hope this helps someone...

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
  •