Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1486795

    Hi,

    I’m using following code in the functions.php to have “Ja” und blank for “false” in Contact form messages.

    add_filter('avf_form_message', 'avf_form_message_mod_checkbox', 10, 3);
    function avf_form_message_mod_checkbox($message, $new_post, $form_params) {
    	$message = str_replace('true', 'Ja', $message);
    	$message = str_replace('false', '', $message);
        return $message;
    }

    When setting up the Autoresponder I’m still getting “true” and “false”.

    What am I missing to achieve that on that end as well?

    Kind regards.

    • This topic was modified 1 day, 1 hour ago by tebitrongmbh.
    #1486847

    Hey tebitron,

    Thank you for the inquiry.

    You can use the avf_contact_form_autoresponder_mail to filter the content of the autoresponsder message.

    Example:

    add_filter("avf_contact_form_autoresponder_mail", function($mail_array, $new_post, $form_params, $class) { 
        $mail_array["Message"] = str_replace('true', 'Ja', $mail_array["Message"]);
        $mail_array["Message"] = str_replace('false', '', $mail_array["Message"]);
    
        return $mail_array;
    }, 10, 4);
    

    Let us know the result.

    Best regards,
    Ismael

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