Im new in module development. I tried to use annotate module example from Pro Drupal development book and I have strange error.
I can’t save Annotations per node and other settings. I can’t reset it to default. And I alwaye getting “Please enter a number.” Even if I have set number.
I made output echo “out = ”.$form_values['annotation_limit_per_node'];
But it’s empty
Glad if anybody could point out if I have configured anything wrongly.
Drupal 5.2
/**
* Define the settings form.
*/
function annotate_admin_settings() {
$form['annotate_nodetypes'] = array(
'#type' => 'checkboxes',
'#title' => t('Users may annotate these node types'),
'#options' => node_get_types('names'),
'#default_value' => variable_get('annotate_nodetypes', array('story')),
'#description' => t('A text field will be available on these node types to make user-specific notes.'),
);
$form['annotate_deletion'] = array(
'#type' => 'radios',
'#title' => t('Annotations will be deleted'),
'#description' => t('Select a method for deleting annotations.'),
'#options' => array(
t('Never'),
t('Randomly'),
t('After 30 days')
),
'#default_value' => variable_get('annotate_deletion', 0) // default to Never
);
$form['annotate_limit_per_node'] = array(