So I am reading Drupal Development Pro 7 and have stumbled upon something I am a little bit unsure about to do with the variable_get function & form element. I understand it retrieves a stored value from the database and the second parameter is a default value if it cannot find anything in the database matching that form element.
My question is what does the second parameter do in this example below.
foreach($types as $node_type){
$options[$node_type->type] = $node_type->name; //access the $node_type object and store specific properties from the node_type object in $options array
}
//Checkboxes on Form
$form['annotate_node_types'] = array(
'#type' => 'checkboxes',
'#title' => t('Users may annotate these content types'),
'#options' => $options,
'#default_value' => variable_get('annotate_node_types', array('page')), //when using the system_settings_form, the name of the form element must match the key of the variable_get ie $form[] = variable_get('$form[]', '') Always form_element name
'#description' => t('A text field will be available on these content types to make user-specific notes.'),
);