Support » Plugin: Contact Form 7 » Dropdown based on Users

  • Is there a way to send an email based on what’s on the dropdown?
    I also need the drop-down menu to show “Contributors” on the website

Viewing 10 replies - 1 through 10 (of 10 total)
  • You can use the dropdown value as e-mail just like email tag.

    Unhappily CF7 do not implement enough filters for users/developers. But for add options you can hack “Listo” using the wpcf7_form_tag_data_option filter.

    Here is a simple plugin to do what you want:
    https://gist.github.com/mariovalney/5b401488789d1838fcabdaf39122dc08

    You should use a tag like this: [select your-select-key data:users.contributor]
    you can remove .contributor to get all users or change the role

    Thread Starter Jack Mawhinney

    (@jackjpdiscos)

    Hi Mario,
    Thanks for this, this is brilliant!

    Is there a way to dynamically set the email address from the field above?

    I don’t understand your question.
    Emails are already dynamic from users.

    • This reply was modified 1 year, 3 months ago by Mario Valney.
    Thread Starter Jack Mawhinney

    (@jackjpdiscos)

    So, in the dropdown box Person A is selected.

    How can I get the e-mail address box to auto-populate based on a lookup on Person A?

    Please, provide the page with the contact form.

    But I already guess you will have to add JS to achieve this.

    Thread Starter Jack Mawhinney

    (@jackjpdiscos)

    I can’t, it’s a locked down site.

    The ultimate goal is:

    Person A is selected, Person A receives the email
    Person B is selected, Person B receives the email

    This select will have the mail selected in it.
    Just like any tag [your-select-key].

    Thread Starter Jack Mawhinney

    (@jackjpdiscos)

    Okay, I will have to use that instead then.

    Is there a way with CF7 to use the email to send from the current logged in user?

    Maybe you can add a hidden field with current user as default.
    So that tag will have the email as value.

    I’m sure we can do that, but docs can help on that.

    Thread Starter Jack Mawhinney

    (@jackjpdiscos)

    Maybe – will have a look.
    Thanks for your help

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Dropdown based on Users’ is closed to new replies.