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.

Create Dropdown for sender email

  1. Trisha
    Member

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

    Posted 12 years ago on Saturday July 28, 2012 | Permalink
  2. Trisha
    Member

    Nevermind........I just figured out that this can be done easily by simply choosing user_email from the input merge tags in the field's "default value" setting...... brilliant, and solves my problem!

    :-)

    Posted 12 years ago on Saturday July 28, 2012 | Permalink
  3. Great. Thank you for the update.

    Posted 12 years ago on Sunday July 29, 2012 | Permalink

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