Is there a way to have the value of an email field pre-populated based on a choice from a dropdown?
I am building a very small intranet for a company and they have several forms that employees can choose from to send various requests to other departments. Their old system does not require employees to type in their email addresses, so they don't want to require them to do it now.
What would be coolest is for the (from) email to be set to whatever is specified in their user profile within WordPress, but another option would be for them to just choose their own name from a dropdown (there are only a dozen employees)......
I created a dropdown list and put their email address in the 'value' field for each list item, and then used that merge tag in the Notifications area for the from Name, from Email, and Reply to email fields, but that did not work - email was sent from the admin user email address, which means of course that the email recipient will not be able to reply to the correct person, and would have to rely on the employee choosing [correctly] their own name from a dropdown in order to be sure who the request came from......a bit less than ideal.
I don't mind having a custom function in the functions.php file to prepopulate an email field based on either the user's WP email or a dropdown from which they choose their name, and can hide that field using CSS, but I'm not experienced enough of a coder to write the function myself.
Many thanks in advance for any help with this problem......