Closed ibrain90 closed 2 years ago
Do you use standard component on page or do you use Raw fields markup?
I tested form with default textarea markup and use standard component on the CMS page and placeholder works correctly.
I tested form with default textarea markup and used raw fields markup and still placeholder works.
So I assume you changed default markup in some way or use raw fields markup.
Probably the issue is that you have white space in textarea content. You cannot have any line breaks or spaces between opening and closing textarea
tag.
Something like this will produce the error you have:
<textarea>
</textarea>
This example will not show placeholder, because it has line breaks inside tags.
<textarea placeholder="Test">
</textarea>
This is correct, it will show placeholder.
<textarea placeholder="Test"></textarea>
Here is similar issue: https://stackoverflow.com/questions/2202999/why-is-textarea-filled-with-mysterious-white-spaces
I recommend you to not use Raw Fields Markup if you don't know HTML well. The better approach if you need to customize field markup is to clone field type and customize it there.
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Expected behavior Expect display placeholder in textarea.
Screenshots If applicable, add screenshots to help explain your problem.
October version 2.1.26
Plugin version 2.1.6
Additional context Placeholder not show because textarea not empty and contain 18 spaces although default falue is empty. If set default value, value display in textarea without any spaces. I tryed duplicate textarea text field and remove all twig variables from textarea in template. Problem continue reproducing. But when I add textarea element to a page no one spaces in textarea and placeholder desplaying.