Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #721918

    Hello,
    How can we place a contact form inside an other element, like the accordeon?
    julia

    #722968

    Hey 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,
    Ismael

    #725394

    Hi 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.php

    But 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?

    #725419

    Hey!

    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,
    Yigit

    #725436

    Hi 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;
    }
    #725443

    Hey!

    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,
    Yigit

    #725455

    Hi yigit,

    That is great but we are using 2 forms on the same page…

    #726258

    Any idea how to target the specific forms on the same page?

    #726669

    Hi,

    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,
    Yigit

    #726995

    Hi 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?

    #727033

    Hi,

    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,
    Yigit

    #727037

    Hi Yigit,

    This still returns the default form subject line on both forms.

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