Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1368105

    Hi,
    It seems to be not possible to adjust english text in contact for validation equation validation “Please prove that you are human by solving the equation””Is there some way how to adjust this text easily?

    #1368144

    Hey Jaro,
    Is your issue related to your site language show this text in English? If so you can edit the .po file for your language with Poedit see our documentation. Poedit is easy to use and free, some language files are not as complete as others.
    You can also change the text to something else in your language.
    You can also change the text with javascript, by adding this code to the end of your functions.php file in Appearance ▸ Editor:

    function custom_contact_form_text_script() { ?>
      <script>
    window.addEventListener('DOMContentLoaded', function() {
    (function($){
    $('html[lang="en-US"] .avia_ajax_form.av-form-labels-visible label').text(function(index, text) {
        	return text.replace('Please prove that you are human by solving the equation ', 'Answer this question if you are real');
    		});
    })(jQuery);
    });
    </script>
      <?php
    }
    add_action('wp_footer', 'custom_contact_form_text_script');

    Note that I have set the page language to English with: html[lang=”en-US”] you can remove this or change it to your language, then edit Answer this question if you are real to suit your needs.

    Best regards,
    Mike

    #1368145

    Hey Jaro,
    Is your issue related to your site language show this text in English? If so you can edit the .po file for your language with Poedit see our documentation. Poedit is easy to use and free, some language files are not as complete as others.
    You can also change the text to something else in your language.
    You can also change the text with javascript, by adding this code to the end of your functions.php file in Appearance ▸ Editor:

    function custom_contact_form_text_script() { ?>
      <script>
    window.addEventListener('DOMContentLoaded', function() {
    (function($){
    $('html[lang="en-US"] .avia_ajax_form.av-form-labels-visible label').text(function(index, text) {
        	return text.replace('Please prove that you are human by solving the equation ', 'Answer this question if you are real');
    		});
    })(jQuery);
    });
    </script>
      <?php
    }
    add_action('wp_footer', 'custom_contact_form_text_script');

    Note that I have set the page language to English with: html[lang=”en-US”] you can remove this or change it to your language, then edit Answer this question if you are real to suit your needs.

    Best regards,
    Mike

    #1368164

    Thanks Mike. The function worked perfectly. Feel free to close this one.

    #1368172

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Adjust default validation text in contact form’ is closed to new replies.