Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1092324

    Hello Team,

    Have previously been advised successfully by Ismael to add the following code to functions.php:

    * Customising Autoresponder to start with Dear<first name>*/
    function avf_form_custom_autoresponder_mod( $out, $user_input, $contact_form, $contact_form_input )
    {
    	$out =	"Dear " . urldecode($contact_form_input['1_1']). ",<br/><br/>" . $contact_form->form_params['autoresponder'];
    	return $out;
    }
    add_filter( 'avf_form_custom_autoresponder', 'avf_form_custom_autoresponder_mod', 10, 4 );

    This code worked perfectly to send an Autoresponder starting with Dear <first name>,. However this code is now broken and the Autoresponder now shows “Dear ,” (missing the <first name> field). Perhaps this code had been changed in one of the recent Enfold updates?

    Please advise,
    ofekw

    #1093116

    Hey ofekw,

    We have not done any changes on our form at all. Have you filled the name properly?

    Best regards,
    Basilis

    #1093147

    Hello Basilis,

    Thanks for following up. There was no change to any of the contact forms layout, but there were changed to functions.php with code added after the one showing above. Also, a contact form plugin was installed: Contact Form 7.

    Could any of these changes cause the code to break? Can you refer this to Ismael please – this should be a quick fix…

    Thanks!
    ofekw

    #1093429

    Hi,

    The issue is this, please disable the contact form plugin so we can test if this works out properly

    Best regards,
    Basilis

    #1093455

    Hi Basilis,

    Thanks for following up. Have disabled Contact Form 7 plugin. Please do let me know if you need admin rights.

    Regards,

    ofekw

    #1094157

    Hi,

    Has this been shorted out by disabling the Contact Form 7?

    Best regards,
    Basilis

    #1094185

    Hi Basilis,

    Thanks for following up,

    No the autoresponder still does not show the <first name> field after deactivating Contact Form 7. Perhaps Ismael can look closer at this issue please?

    Kind Regards,
    ofekw

    #1094611

    Hi,

    Did you enable the reCAPTCHA option? Please try to replace this line:

    urldecode($contact_form_input['1_1']).
    

    .. with:

    urldecode($contact_form_input['1_2']).
    

    Best regards,
    Ismael

    #1094615

    Hello Ismael,

    Yes, have enabled Google reCAPTCHA v3 which stopped all spam!

    Unfortunately changing that line of code did not make any difference, autoresponder email starts with “Dear ,” missing the field <first name>.

    Any ideas?

    Thanks,

    ofekw

    #1094633

    Hi,

    Glad to hear that the spam protection is working. For the current issue, please replace the “1_2” with “2_1”. That is the generic id of the “First Name” field.

    urldecode($contact_form_input['2_1']).
    

    Best regards,
    Ismael

    #1094639

    Hi Ismael,

    Perfect!

    Case closed.

    Much appreciated,

    ofekw

    #1095158

    Hi,

    Awesome. Glad we could help!

    Please take a moment to review our theme and show your support https://themeforest.net/downloads
    Don’t forget to bookmark Enfold Documentation for future reference.

    Thank you for using Enfold :)

    Best regards,
    Ismael

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.