Input Field – select

Input Field – select

You can use the select input field to allow users to select option from a dropdown of the pre-defined values. See the below example about how you can use select input field –
ExampleCopy to Clipboardarray(
'type' => 'select',
'heading' => esc_attr__( 'Select styles', 'fusion-builder' ),
'description' => esc_attr__( 'This field allows you to display dropdown of the pre-defined values.', 'fusion-builder' ),
'param_name' => 'styles',
'value' => array(
'green' => esc_attr__( 'Green', 'fusion-builder' ),
'darkgreen' => esc_attr__( 'Dark Green', 'fusion-builder' ),
'orange' => esc_attr__( 'Orange', 'fusion-builder' ),
'blue' => esc_attr__( 'Blue', 'fusion-builder' ),
'red' => esc_attr__( 'Red', 'fusion-builder' ),
),
) 1array(2  'type'        => 'select',3  'heading'     => esc_attr__( 'Select styles', 'fusion-builder' ),4  'description' => esc_attr__( 'This field allows you to display dropdown of the pre-defined values.', 'fusion-builder' ),5  'param_name'  => 'styles',6  'value'       => array(7        'green'     => esc_attr__( 'Green', 'fusion-builder' ),8        'darkgreen' => esc_attr__( 'Dark Green', 'fusion-builder' ),9        'orange'    => esc_attr__( 'Orange', 'fusion-builder' ),10        'blue'      => esc_attr__( 'Blue', 'fusion-builder' ),11        'red'       => esc_attr__( 'Red', 'fusion-builder' ),12   ),13)Parameters type
( string ) input type. heading
( string ) Setting title. description
( string ) Short description about the setting field. param_name
 ( string ) Attribute name to be used in the shortcode. value
( array ) Array of pre-defined values.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注