PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Drop down menu value

  1. Is it possible to have a different value attribute for the drop down items?
    For example:
    <option value="johndoe@email.com">John Doe</option>

    I want the drop down to submit an email address when the user selects a name.

    Posted 14 years ago on Wednesday July 28, 2010 | Permalink
  2. Currently no, this isn't possible as a feature. It is possible by writing some custom PHP and using an API hook.

    What are you trying to accomplish? If you are wanting to do notification email routing this is a built in feature. So if you want to send the notification to a person in the drop down, you can do so in the Notification settings for the Admin Notification.

    We do plan on making it possible to have a different value and option label in a future release.

    Posted 14 years ago on Wednesday July 28, 2010 | Permalink
  3. This thread haven't been answered yet. Sorry for reviving this post again.

    But i think i found the solution the create a hook for predefined choices have different value than label.

    $choices["My New Choices"] = array("Choice 1|ryan1", "Choice 2|ryan2");

    The Label and Value is separated by using "|" / "OR" symbol.

    complete hook - http://www.pastie.org/1407894
    -tested for drop down on 1.5.rc2.2

    Ryan H.

    Posted 13 years ago on Monday December 27, 2010 | Permalink
  4. @osky1980 This is an old thread. The capability to have a different value was added to Gravity Forms a few releases ago. So it is a feature that is in the form builder for drop down, radio button and checkbox fields.

    Posted 13 years ago on Monday December 27, 2010 | Permalink

This topic has been resolved and has been closed to new replies.