Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make wordpress visual composer attribute check box checked initially

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.

like image 533
itshimelkazi Avatar asked Feb 29 '16 11:02

itshimelkazi


1 Answers

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.

like image 69
Павел Иванов Avatar answered Nov 10 '22 19:11

Павел Иванов