问题
After a bit of playing around with Orchards' Custom Forms module, i decided i wanted to use a dropdownlist to select a particular person with their email as the value for that selected option. While i was creating the form i couldn't see anyway you could set values to your options.
See below image for example:
Don't suppose anybody has come across this before or has a suggestion?
回答1:
In your case I wouldn't worry about having different text and values for the fields. It's also potentially dangerous to make the recipient email an input of the HTML form.
The Custom Form Rule Event provided with Orchard gives you no way to look at the values of the content type created by the form. So, you're probably going to have to write your own. You should be able to base this on Orchard.CustomForms.Rules.CustomFormEvents.
Armed with this you'd be able to create new rules for each possible dropdown value and set the email address in the action for each rule.
来源:https://stackoverflow.com/questions/14685761/orchard-custom-form-dropdownlists