-
Notifications
You must be signed in to change notification settings - Fork 0
Textarea
The textarea field lets your users enter multi-line text content.

You can adjust the height of a textarea by adjusting the amount ot visible rows. By default it is 8.
In PHP you can use the set_rows method:
Field::create( 'textarea', 'bio' )
->set_rows( 20 )The the_content filter in WordPress allows the core and plugins to modify the content of a post. It comes with many tags/functions already attached to it:
wptexturizeconvert_smiliesconvert_charswpautopshortcode_unautopprepend_attachment
This filter will fix special characters, add paragraphs and shortcodes and more.
In PHP, if you want the filter to be applied, use the apply_the_content method. It accepts a single, $flag argument, which allows you to toggle if you want to enable or disable the filter.
This filter could have many hooks attached to itself and could lead to slow performance. Only apply this if really needed.
Field::create( 'textarea', 'bio' )
->apply_the_content()The do_shortcodes function in WordPress converts shortcodes to actual content. Enabling this setting will automatically apply shortcodes when the content of the field is being used.
In PHP, use the do_shortcodes method. It accepts a single, $flag argument, which allows you to toggle if you want to enable or disable the filter.
Field::create( 'bio' )
->do_shortcodes();The wpautop function in WordPress automatically adds paragraphs to a string. Enabling this setting will automatically add paragraphs to the content of a textarea field when used.
In PHP, use the add_paragraphs method. It accepts a single, $flag argument, which allows you to toggle if you want to enable or disable the filter.
Field::create( 'bio' )
->add_paragraphs();Quick start
- Creating fields and using their values
- Installation
- Administration interface
- Using the PHP API
- Container Settings
Locations
- Overview & Usage
- Post Type
- Options Page
- Taxonomy
- Comment
- User
- Widget
- Shortcode
- Menu Item
- Attachment
- Customizer
Fields
- Fields
- Text
- Textarea
- WYSIWYG
- Password
- Checkbox
- Select
- Multiselect
- Image Select
- File
- Image
- Audio
- Video
- Gallery
- WP Object
- WP Objects
- Link
- Date
- DateTime
- Time
- Color
- Font
- Icon
- Map
- Embed
- Number
- Sidebar
- Complex
- Repeater
- Layout
- Section
- Tab
- Message
Features
- Adding fields to the Customizer
- Conditional Logic
- Front-End Forms
- Administration columns
- Import and Export
- REST API
- JSON Synchronization
- Yoast SEO
Ultimate Post Types
Functions and API
Tutorials