Hi all. I have created a form with this select:
$form['dati'] = array ( '#title' => 'Dati', '#type' => 'checkboxes', '#description' => 'Settagi per il livello', '#options' => array('ecomm' => 'Visibile Ecomm','visibile' => 'Visibile altri form','default' => 'Default') );
I have this _submit fom():
function add_lU_form_submit($form,$form_values) { if ($form_values['dati']['ecomm'] == 0) $ecomm2 = 0; else $ecomm2 = 1;
if ($form_values['dati']['visibile'] == 0) $visibile = 0; else $visibile = 1;
var_dump($ecomm2); var_dump($visibile);
exit; //Test stop here; [....] }
So, In the output form I check the Ecomm field so $form_values['dati'] is :
array(3) { ["ecomm"]=> string(5) "ecomm" ["visibile"]=> int(0) ["default"]=> int(0) }
Now: why this piece of function (say above) give always 0 :
if ($form_values['dati']['ecomm'] == 0) $ecomm2 = 0; else $ecomm2 = 1;
I don't' understand why.
Tnx.