Tagged: accordeon, CONTACT FORM
-
AuthorPosts
-
December 8, 2016 at 1:17 pm #721918
Hello,
How can we place a contact form inside an other element, like the accordeon?
juliaDecember 12, 2016 at 7:07 am #722968Hey hotspot!
Thank you for using Enfold.
Generate the contact form shortcode on a separate page then copy it inside the accordion content field. Please note that some combinations of elements might not work properly.
Best regards,
IsmaelDecember 16, 2016 at 4:05 pm #725394Hi Ismael,
If i’m correct we have to activate the debug mode so we can copy the shortcode?
We followed this instruction and added the code underneath the line in the parent theme functions.phpBut this does not seem to work, we do not see the field in the back-end.
ps: when we add a functions.php file to the child theme, the website goed blanco.
Any idea how to solve this?
December 16, 2016 at 4:18 pm #725419Hey!
You have shared your logins on another thread. I will look into it and will update you on that thread regarding this issue as well. Let us continue there :)
Best regards,
YigitDecember 16, 2016 at 4:49 pm #725436Hi Yigit,
Thanks for helping out in the other thread.
debugged and the form is working now ;-)
Would be great to be able to change the subject for this particular/new form back to the default options.
Or set the subject to something static directly in the functions.Maybe it is a better solution to target the specific form the code in the functions should be targetting….
add_filter('avf_form_subject','avia_change_mail_subject', 10, 3); function avia_change_mail_subject($subject, $new_post, $form_params) { $subject = 'xxxxxxxxxxxx - ' . urldecode($new_post['4_3']); return $subject; }
December 16, 2016 at 5:00 pm #725443Hey!
You can change the code to following one
add_filter('avf_form_subject','avia_change_mail_subject', 10, 3); function avia_change_mail_subject($subject, $new_post, $form_params) { if(is_page(59)){ $subject = 'xxxxxxxxxxxx - ' . urldecode($new_post['4_3']); } return $subject; }
To apply the code on page with ID 59
Best regards,
YigitDecember 16, 2016 at 5:18 pm #725455Hi yigit,
That is great but we are using 2 forms on the same page…
December 19, 2016 at 8:26 pm #726258Any idea how to target the specific forms on the same page?
December 20, 2016 at 5:15 pm #726669Hi,
Please try using the code as following
add_filter('avf_form_subject','avia_change_mail_subject', 10, 3); function avia_change_mail_subject($subject, $new_post, $form_params,$formID) { if(is_page(59) && $formID == 1){ $subject = 'xxxxxxxxxxxx - ' . urldecode($new_post['4_3']); } elseif(is_page(59) && $formID == 2{ $subject = 'xxxxxxxxxxxx - ' . urldecode($new_post['4_3']); } return $subject; }
You can change form ID’s as needed – http://i.imgur.com/3CNVsEG.png?1
Best regards,
YigitDecember 21, 2016 at 1:13 pm #726995Hi Yigit,
Thanks for you extra code.
Unfortunately the code is returning the default subject messages now that are set in the form. I changed the page id and form id’s accordingly:add_filter('avf_form_subject','avia_change_mail_subject', 10, 3); function avia_change_mail_subject($subject, $new_post, $form_params, $formID) { if(is_page(133) && $formID == 1) { $subject = 'xxxxxxxx - ' . urldecode($new_post['4_1']); } elseif(is_page(133) && $formID == 2) { $subject = 'xxxxxxxx - ' . urldecode($new_post['4_3']); } return $subject; }
Any idea whatmight be going wrong.
ps: what is the “10, 3” code for?
December 21, 2016 at 2:35 pm #727033Hi,
Can you please change the code to following one
add_filter('avf_form_subject','avia_change_mail_subject', 10, 4); function avia_change_mail_subject($subject, $new_post, $form_params, $formID) { if(is_page(133) && $formID == 1) { $subject = 'xxxxxxxx - ' . urldecode($new_post['4_1']); } elseif(is_page(133) && $formID == 2) { $subject = 'xxxxxxxx - ' . urldecode($new_post['4_3']); } return $subject; }
10 is priority and 4 is accepted args
Best regards,
YigitDecember 21, 2016 at 2:41 pm #727037Hi Yigit,
This still returns the default form subject line on both forms.
December 28, 2016 at 3:20 am #728338Hi,
We adjusted the coed a bit.
// https://kriesi.at/support/topic/contact-form-subject-line-fill-with-text-field/#post-728337
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.