Input Field – radio_image_set

Input Field – radio_image_set

You can use the radio_image_set input field to allow users to select the image as an option. See the below example for how you can use the radio_image_set input field.
ExampleCopy to Clipboardarray(

'type' => 'radio_image_set',

'heading' => esc_attr__( 'Radio Image Test', 'fusion-builder' ),

'description' => esc_attr__( 'Add a short description for the field.', 'fusion-builder' ),

'param_name' => 'images',

'value' => array(

'pattern1' => get_stylesheet_directory_uri(). '/assets/images/patterns/pattern1.png',

'pattern2' => get_stylesheet_directory_uri(). '/assets/images/patterns/pattern2.png',

),

'width' => '48px',

'height' => '48px',

)​x 1array(2​3  'type'        => 'radio_image_set',4​5  'heading'     => esc_attr__( 'Radio Image Test', 'fusion-builder' ),6​7  'description' => esc_attr__( 'Add a short description for the field.', 'fusion-builder' ),8​9  'param_name'  => 'images',10​11  'value'       => array(12​13    'pattern1' => get_stylesheet_directory_uri(). '/assets/images/patterns/pattern1.png',14​15    'pattern2' => get_stylesheet_directory_uri(). '/assets/images/patterns/pattern2.png',16​17 ),18​19  'width' => '48px',20​21  'height' => '48px',22​23)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 image id and the image url. Image id from the array will be stored in the shortcode, so you can get the url from it. width
( string ) The width for the image being displayed in the setting field. This is useful if you want to display multiple fields with different image sizes. height
( string ) The height for the image being displayed in the setting field. This is useful if you want to display multiple fields with different image sizes.

发表回复

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