Reputation: 71
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.
Upvotes: 6
Views: 8703
Reputation: 1154
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.
Upvotes: 7