Jump to content

Switch button default always showing 'NO'


Recommended Posts

Hi,

 

I have a problem with switch field in prestashop 1.6. When I implemented default is showing NO, I want default to be Yes. can someone help on this?

 

/* isparent array */
      $is_parent_array = array(
        array(
            'id' => 'is_parent_on',
            'value' => 1,            
            'label' => $this->l('yes')            
            ),
        array(
            'id' => 'is_parent_off',
            'value' => 0,
            'label' => $this->l('No')            
            )
        
        );
 

 

//switch field

 array(
        'type' => 'switch',
        'label' => $this->l('Is Parent'),
        'name' => 'is_parent',
        'is_bool' => true,
        'values' => $is_parent_array,        
        ),
 

 

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...