Add-On API 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:
You can also add a textarea field:
$this->add_on->( 'field_name', 'Field Name', 'textarea', null, 'Tooltip', false, 'Default Text');
It will look like this:
Display Text & Titles
Other times, you might want to include a 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 Docs
See the complete structure for an import Add-On created for WP All Import.
Learn about using radio fields for WP All Import Add-Ons.
Learn about using image fields in your WP All Import Add-On.
Learn about adding nested fields to your WP All Import Add-On.