Set a default text for a Textfield or Textarea
If you want to add a default text into a text or textarea its only possible with some custom jQuery.
You can add jQuery into a form with the HTML form element. Just paste the above example into a html form element and adjust the field slug and message text.
In the above example you see to variables default_text and field_slug
Change ' The default Text' to you custom text and keep the ''.
Change the ' editpost_content' to the field slug you want to add the default text into. 'editpost_content' is the default content slug for the WordPress post content.
var default_text = 'The default Text'; |
var field_slug = 'editpost_content'; |