checkbox - prestashop multiple checkboxes do not save values -


i can't figure out why checkbox values not saved in database using helpers.

trying save customers ids module's setting :

the array :

$custs = customer::getcustomers(); foreach ($custs $key => $value) {   $options[] = array(         'id_customer' => (int)$value['id_customer'],         'infos' => $value['firstname'].' '.$value['lastname'].' | '.$value['email']     ); } 

the checkboxes :

'input' => array(         array(             'type' => 'checkbox',             'label' => $this->l('customers'),             'desc' => $this->l('select customers.'),             'name' => 'my_module_customers',             'values' => array(                 'query' => $options,                 'id' => 'id_customer',                 'name' => 'infos',             ),         ), ) 

the $_post empty works input. appreciated.

thank you.

your code correct, tried , result http://screencast.com/t/wfsw86ijj

  1. you have click @ least 1 checkbox.
  2. show data on server :

        print_r($_post);     die(); 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -