Text Fields

Text Fields

If you need users to be able to input text so they can import a string, use a text input field. This is useful when the possible values for the field aren』t constrained to a predefined list. These fields should all be defined in your add-on's constructor.

$this->add_on->add_field( 'property_address', 'Property Address', 'text', null, 'Tooltip', false, 'Default Text' );

Here』s what a text input field looks like:

Add-On Text Field

You can also add a textarea field:

$this->add_on->( 'field_name', 'Field Name', 'textarea', null, 'Tooltip', false, 'Default Text');

And, it will look like this:

Text Area Field

Display Text & Titles

Other times you might want to include title or text to explain things to users. You can use the following functions to add titles and text to the UI of your add-on.

$this->add_on->add_title( 'Title Text', 'Text that will appear as a tooltip next to the title.' );
$this->add_on->add_text( 'This is text that will appear as a normal paragraph.' );

Related

Add-On Structure

Radio Fields

Image Fields

Nested Fields

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注