i have problem value checkboxes returns me: first of start 2 variables:
$blabla_severity_levels = variable_get('blabla_severity_levels', array()); $blabla_severity_options = array();
then make each watchdogs:
foreach (watchdog_severity_levels() $severity_numbers => $severity) { $blabla_severity_options[$severity_numbers] = check_plain(drupal_ucfirst($severity)); }
then generate form:
$blabla_form['blabla_severity_levels'] = array( '#type' => 'checkboxes', '#title' => t('type of log messages'), '#options' => $blabla_severity_options, '#default_value' => array_values($blabla_severity_levels), '#required' => true, ); return system_settings_form($blabla_form);
and in function call like:
$severity_levels = variable_get('blabla_severity_levels', array());
now if make dpm($severity_levels)
gets me out array
error (string, 5 characters ) error warning (string, 7 characters ) warning emergency (integer) 0 alert (integer) 0 critical (integer) 0 notice (integer) 0 info (integer) 0 debug (integer) 0
but needing blabla_severity_options is:
error (string, 5 characters ) 3 warning (string, 7 characters ) 4 emergency (integer) 0 alert (integer) 0 critical (integer) 0 notice (integer) 0 info (integer) 0 debug (integer) 0
i want save values...... ideas plz?? need help
Comments
Post a Comment