PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, August 3, 2022

[FIXED] How to set multi default value in type checkbox Visual Composer shortcode?

 August 03, 2022     visual-composer     No comments   

Issue

I have code multi checkbox here:

array(
        "type"        => "checkbox",
        "heading"     => esc_html__( 'Theme Data', 'my-theme' ),
        "param_name"  => "pr_name",
        "admin_label" => true,
        "value"       => array(
            esc_html__( 'Department', 'my-theme' ) => 'department',
            esc_html__( 'Salarry', 'my-theme' ) => 'salarry',
            esc_html__( 'Address', 'my-theme' ) => 'address',
            esc_html__( 'Degree', 'my-theme' ) => 'degree',
            esc_html__( 'Work time', 'my-theme' ) => 'time',
            esc_html__( 'End time', 'my-theme' ) => 'enddate'
        ),
        'std' => array('department', 'salarry'),
    );

Yes, this code not working. How to checked value default is: department and salarry ?

Where is wrong? Please help me.


Solution

you can just use 'department,salarry' as the value of the 'std' key.

'std' => 'department,salarry',


Answered By - Wesley - Synio
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing