-
AuthorPosts
-
December 6, 2016 at 12:06 am #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,
SladeDecember 8, 2016 at 4:39 pm #722057Hey Slade,
Can you please elaborate on the changes you would like to make? I am not sure if i understood you clearly.
Best regards,
YigitDecember 9, 2016 at 1:48 am #722283Hey 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!
SladeDecember 13, 2016 at 5:52 am #723529Hi,
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,
IsmaelDecember 13, 2016 at 6:19 am #723535Ok…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!
SladeDecember 14, 2016 at 11:00 pm #724625Hi Slade,
Try using
\n
instead of
<br>
Hope this helps.
Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.