Text Field Join KC discussion

The Text field creates a simple text input, accepts any forms of text and optionally validates the text. It is useful to store single string value. KingComposer field text

Map Usage:

array(
	'name' => 'field_id',
	'label' => 'Field Label',
	'type' => 'text',  // USAGE TEXT TYPE
	'value' => 'DEFAULT-CONTENT', // remove this if you do not need a default content
	'description' => 'Field Description',
)

Example:

Register a new shortcode with filed type: text
add_map(

        array(

            // 1st shortcode element
            'my_shortcode' => array(
                'name' => 'My Shortcode',
                'description' => 'This is my shortcode',
                'icon' => 'my-class-icon',
                'category' => 'Content',
                'params' => array(
                    //1st field
                    array(
                        'name' => 'field_id',
                        'label' => 'Field Label',
                        'type' => 'text',  // USAGE TEXT TYPE
                        'value' => 'DEFAULT-CONTENT', // remove this if you do not need a default content
                        'description' => 'Field Description',
                    ),
                    //2nd field
                )
            ),

            // 2nd shortcode element

        ) // End Arrays
    );

} // end my_wp_init()

?>

Read more