The Field Select setting, field-select, is an advanced setting type for selecting a specific field from the current list of fields in the form. This setting can be used as a field setting, action setting, or form setting. New fields added to the form will automatically be available. Likewise, fields removed from the form will also be removed from the field select options.
The following example shows a basic ‘field-select’ definition.
|$this->_settings[ 'field_map' ] = array(|
|'name' => 'field_map',|
|'type' => 'field-select',|
|'label' => __( 'Field Map', 'ninja-forms'),|
|'width' => 'full',|
|'group' => 'primary',|
|/* Optional */|
|'field_types' => array(|
|'field_value_format' => 'merge_tag // merge_tag (default), key|
Specified Field Types
By default, all field types are used as options in the field select setting. The field_types` property can be set with specific field types as an array of strings.