Viewing 4 replies - 1 through 4 (of 4 total)
  • @tristanslater

    The quick and dirty way to add placeholder text is to edit the plugin file.

    Edit this file: /wp-content/plugins/checkmail-validation-for-contact-form-7/checkmail-validation-for-contact-form-7.php

    Around Line 117 change this:

    $html = '<input type="text" name="checkmail_' . $name . '" />';

    to this:

    $html = '<input type="text" name="checkmail_' . $name . '" value=""' . $atts . ' placeholder="Confirm Email Address" />';

    So you’re basically just manually adding the placeholder text to the text field.

    Also remember that if the developer ever updates the plugin, your edit to the checkmail-validation-for-contact-form-7.php file will be overwritten.

    Thread Starter tristanslater

    (@tristanslater)

    Thank you for you help.

    Do you think there a way to add a add this to maybe overwrite the shortcode with a new plugin or just in functions.php?

    You should not use the quick and dirty version unless you really, really have to. Instead use jQuery to add the placeholder text:

    <script>
    	$(document).ready(function() {
    		$(".wpcf7-checkmail").attr("placeholder", "Confirm Email Address");
    	});
    
    </script>
    Thread Starter tristanslater

    (@tristanslater)

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Placeholder’ is closed to new replies.