Placeholder Text
The method below will not work for versions of IE below 10.
If you're looking to set an input field's placeholder, try:
If it's going to be a textarea, then do:
(Add the code to the JavaScript editor for your form, replacing InternalName with the appropriate internal name).
If you need this thing to work in IE versions 9 and lower, your best bet is to use the jQuery placeholder plugin: https://github.com/mathiasbynens/jquery-placeholder. You'll have to dynamically add a <script> element with src set to the js file and then follow the documentation to set the placeholder. If you need further assistence, let us know.
If you're looking to set an input field's placeholder, try:
Code: Select all
fd.field('InternalName').control()._el().find('input').attr('placeholder', 'my placeholder');
Code: Select all
fd.field('InternalName').control()._el().find('textarea').attr('placeholder', 'my placeholder');
If you need this thing to work in IE versions 9 and lower, your best bet is to use the jQuery placeholder plugin: https://github.com/mathiasbynens/jquery-placeholder. You'll have to dynamically add a <script> element with src set to the js file and then follow the documentation to set the placeholder. If you need further assistence, let us know.
-
- Moderator
- Posts: 33
- Joined: Wed Sep 21, 2016
Hi! First, add a CSS class, say 'input-ph' to a field.
Then insert the following code into CSS-editor (replace colors and the class name with the appropriate values):
Then insert the following code into CSS-editor (replace colors and the class name with the appropriate values):
Code: Select all
.input-ph input::-webkit-input-placeholder {color:#c0392b;}
.input-ph input::-moz-placeholder {color:#c0392b;}/ Firefox 19+ /
.input-ph input:-moz-placeholder {color:#c0392b;}/ Firefox 18- /
.input-ph input:-ms-input-placeholder {color:#c0392b;}
-
- Information
-
Who is online
Users browsing this forum: No registered users and 4 guests