Support » Fixing WordPress » dynamic email recipient contact form

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    Most of the form plugins have hooks that all you to change the recipient address via a filter, so you could code it to change it based on some aspect of the post. What’s your preferreed form plugin?

    Glenn

    (@rglennnall)

    Hey Steve – thanks for your quick response!

    well, I’m using FormCraft, but it’s pretty convoluted in its use…

    I’d be happy to use Contact Form 7, but i’m not really good with hooks and filters.

    Here’s what I’m doing. My client wants some business listings which are simply posts (with custom cats) and each listing will contain a contact form to be sent to said listing. All i really need to do is embed the listing’s contact email address for the contact form.

    many thanks for your help,
    glenn

    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    I don’t see how you’re going to get around the need to do some coding.

    I recommend asking at https://wordpress.org/support/plugin/formcraft-form-builder#new-post so the plugin’s developers and support community can help you with this.

    Glenn

    (@rglennnall)

    oh, i don’t mind doing some coding at all. Just need some help learning how to use a filter to obtain the post’s email value.

    this – https://wordpress.org/plugins/contact-form-7-dynamic-mail-to/ – looks like a plugin that might help and it provides filter examples that might teach me enough to know what the hell I’m doing.

    Tell me what you think? does this look like perhaps what I’m seeking?

    oh, and thanks for the other link…

    • This reply was modified 2 years, 1 month ago by Glenn.
    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    I saw that, too, and thought it might work for you.

    Glenn

    (@rglennnall)

    thanks again, Steve – I know enough about functions and hooks and filters to be able to make this one work.

    Problem is with this one, it’s just a switch, and if we end up with 500+ listings, then that’s one big, long switch, and it would have to manually edited upen any new listing.

    I’ve put in a request for help at FormCraft, and we’ll see if there’s a better way to “dynamically” add a new email rec. upon any new listing. Obviously that’d be much nicer, if there are others who are adding listings besides myself.

    Thanks again. You Rock, I don’t care what they say…

    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    This is the basics of the CF7 filter; you’d need to change it to find the right recipient for the post (or leave it alone if on the contact page, for example).
    https://cfxdesign.com/contact-form-7-dynamic-email-field/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘dynamic email recipient contact form’ is closed to new replies.