Contact form 7 incorrectly rendering the placeholder attribute
-
I am on Chrome and using the latest version of Contact Form 7 (3.9.1) and I am trying to implement a form that uses the HTML5 placeholder attribute. The problem I have is that the only field that is correctly rendering this attribute is the email field. The other type=”text” fields or textarea field DO NOT have the placeholder attribute. Instead the placeholder attribute is rendered as value attribute, and is removed when focusing the fields. Also, all required fields that have the FAKE placeholder attribute DO NOT validate on submit.
I JUST NOTICED that the on page load the placeholder attributes appear just fine on all fields for a split second and then they are replaced with the value attributes. So, this is most likely a javascript issue.
You can see an example of the form I am using here: https://dev.betterhtml.com/cognitive_assessment/placeholder/
Here is the code I am using:
<div class="form_row"> [text* your-name placeholder "Your Name"] </div> <div class="form_row"> [email* your-email placeholder "Your Email"] </div> <div class="form_row"> [text your-phone placeholder "Your Phone"] </div> <div class="form_row"> [textarea your-message placeholder "Your Message"] </div> <div class="form_button">[submit "Send"]</div>
Please help.
- The topic ‘Contact form 7 incorrectly rendering the placeholder attribute’ is closed to new replies.