Support » Plugin: Contact Form 7 » Dynamic recipient for contact form?

  • Resolved SloZiga

    (@sloziga)


    Hello my name is Ziga is it possible to have a dynamic recipient function for the contact form?

    example i want to have 1 contact form that can send to multiple emails. Always 2 emails, one is default that is send whit every form and the other one must be dynamic and change based on the webpage it is on. (example: website that has 100 or more businesses listed on it and each business gets its own page and on each page their is that businesses email address and a contact form (this is 1 default form for every business) now we have to resend all emails manually to each business) which takes up a huge amount of time.

    Is it possible to have 1 contact form that somehow sends mail to 1 main email (that mustn’t change) and to the other based on what page it is on.

    Website example https://goo.gl/XKNRLA on the page u can see the email is listed and below a contact form but this contact form sends mail to just one main email and then we have to resend to the correct buissness.

    Thank you in advance for your help

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • konsument

    (@konsument)

    This might take you to the right direction: https://de.wordpress.org/plugins/contact-form-7-dynamic-text-extension/

    According to the manual you could use a custom field as your email and then set it to an hidden field like this: [dynamictext businessemail „CF7_get_custom_field key=’my_custom_email-field’“]
    Then pass the shortcode [businessemail] to your additional header information in first email as CC or in second email “to”-field. Then the first mail stays fixed, while the second “dynamic business-contact” gets it as CC or second mail.

    Not tested – just build in my imagination 😉

    konsument

    (@konsument)

    and without ACF you could set a hidden field in CF7 and get and set the emailadress via jquery:

    `$(‘#your-hidden-field’).val($(‘.single-contact-email a’).html());

    maybe thats the easiest solution

    Sorry for late reply, but thank you for the idea, it works now.

    Best regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Dynamic recipient for contact form?’ is closed to new replies.