In this tutorial, we look at how to change the lable and placeholder on form elements.
Labels and placeholders on primary fields
USP Pro has “primary” form fields and “custom” form fields. Primary fields are any field that has its own quicktag and shortcode, for example:
For any of these fields, you can change the placeholder (i.e., the text that is displayed in the form field on the front-end) and label (i.e., the text that is displayed in the
<label> tag) as follows:
- Label text: to the shortcode, add
- Placeholder: to the shortcode, add
Of course, you’ll want to change the “Label” and “Placeholder” with whatever makes sense.
Labels and placeholders on custom fields
To change label and placeholder text for custom fields, just add the following attribute to the custom field definition:
When adding an attribute to a custom field, use a vertical pipe
| as a separator, and a pound sign
# to distinguish between the attribute name and attribute value. Here is an example: