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.
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.
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.
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.
@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.