Create Your Own Add-On for WP All Import that contains Radio Fields

Radio Fields

Radio fields allow the user to specify one of multiple, predefined values. These fields should all be defined in your add-on's constructor.

$this->add_on->add_field(
    'property_type',
    'Property Type',
    'radio',
    array(
        'rent' => 'For Rent/Lease',
        'buy' => 'For Sale'
    )
);

The keys in the options array are the actual values that will be passed to the import function. The values are the labels that will be shown to the user in the interface:

Radio Field

If the values in the user’s XML/CSV file are different than the values required by your radio field, the user can use the built-in mapping interface to translate them:

Radio Field Mapping

Related

Add-On Structure

Text Fields

Image Fields

Nested Fields

barsangle-leftangle-rightangle-upcross