according to visual composer knowledge base we can add attribute like
vc_map( array(
"name" => __("Portfolio Grid", "js_composer"),
"base" => "abc-portfolio",
"description" => __("Display masonry portfolio grid", "js_composer"),
"class" => "abc-portfolio-section",
"category" => __("abc Component", "js_composer"),
"params" => array(
array(
"type" => "checkbox",
"admin_label" => true,
"weight" => 10,
"heading" => __( "Make featured", "js_composer" ),
"description" => __("description", "js_composer"),
"value" => array('key' => 'value' ),
"param_name" => "abc_param"
),
)
) );
Here we get a check-box but how can I make this check-box checked initially ?
thanks in advance.
Check the Custom checkbox attribute.
Actually, configuration is possible by array key:
'std' => '', // default unchecked
So you can play with this attribute std with values true/false/'yes'.. and you will see how it changes.
In your case:
"value" => array('key' => 'value' ),
So if 'std'=>'value' your checkbox will be checked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With