Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #720747

    Hi, I made a website for my client who showcases Many physicians. Each physician has their own page with their own contact form. Everything is working great but now my client would like to add specific text that precedes the form results that get sent to each doctor upon form submit.

    Is something like this possible? I would look into another form solution (contact form 7 or gravity form) but I already have almost 200 forms setup and would like to find a solution which doesn’t entail redoing the forms. The preceding confirmation text would be identical on every form so even better if there was a solution to add this in the child-theme function.php file as I did when adding a Bcc: field.

    Thanks,
    Slade

    #722057

    Hey Slade,

    Can you please elaborate on the changes you would like to make? I am not sure if i understood you clearly.

    Best regards,
    Yigit

    #722283

    Hey Yigit!

    The website http://evoxbrainmap.com has many pages created for their doctors. An example would be: http://evoxbrainmap.com/evox-doctors/dr-michael-arata/

    Each form on the doctor pages get sent to that specific doctor’s office. What my client (evoke) would like is to have a statement accompany each form and preceding the form’s content (user’s name, email, subject, message) that gets sent to the doctors office.

    The statement they would like on each form is:
    “Congratulations! A patient has found you on http://www.eVoxBrainMap.com and would like to schedule an appointment for an eVox Assessment. Please contact them immediately to schedule an appointment. If you have any questions, contact Evoke Neuroscience at (917)261-6096.”

    Because we already have around 180 doctor forms built with the default Enfold Contact Form element I’m trying to find a way to do this without having to redo everything on something like Contact Form 7 or another form that would let me do this.

    I said we could place this content into the forms “Subject” field but they didn’t like that idea.

    Does this help?

    Thanks!
    Slade

    #723529

    Hi,

    Thank you for the info.

    Please add this in the functions.php file.

    add_filter('avf_form_message', 'avf_form_message_mod', 10, 3);
    function avf_form_message_mod($message, $new_post, $form_params) {
        $message = "Congratulations! A patient has found you on http://www.eVoxBrainMap.com and would like to schedule an appointment for an eVox Assessment. Please contact them immediately to schedule an appointment. If you have any questions, contact Evoke Neuroscience at (917)261-6096." . $message;
        return $message;
    }

    Best regards,
    Ismael

    #723535

    Ok…that’s pretty amazing! Thank you!! Saved me a ton of time. I’m assuming if I place a <br><br> after the message and before the ” it will give a separation between this text and the form’s content? I’ll test it out but should work.

    Thanks again!
    Slade

    #724625

    Hi Slade,

    Try using

    \n

    instead of

    <br>

    Hope this helps.

    Best regards,
    Nikko

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.