Text Input 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.

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

Here’s what a text input field looks like:

You can also add a textarea field:

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

And, it will look like this:

My First Add-On Text Area

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.

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