Technical Solution
[Drupal] How to add placeholder to webform elements?
In my project I have a requirement to show the form elements as placeholders. Webform Hints module helps to meet my requirement. Webform Hints takes the title of a Webform component and uses it as the placeholder attribute.
It works on following fields:
- textfield
- textarea
- select list (via #empty_option)
Webform_hints requires webform modules. To configure the webform_hints go through these steps :
- Download and enable the webform_hints module
- Configuration > Content Authoring > Webform hints (admin/config/content/webform-hints)
- Select the webform where you want to apply webform_hints.
- Save configuration.
For more details, connect with us. Hope you this tips help you.
Feel free to clear, find and discuss drupal solutions along with us.