Hello All,
I am working on a module that has a 'Settings' page, and uses the values later when displaying content. My question is, when I use variable_get to retrieve the settings, it returns 'Array' instead of the array's value.
I've been reading "Pro Drupal 7 Development", and my form is pretty simple and based off that. I also read in this thread that Drupal creates the variable in the variable table when the form is submitted, so I don't actually call set_variable anywhere.
/**
* Define the settings page form.
*/
function advertisement_settings_nameform($form_state)
{
$form['advertisement_speed'] = array
(
'#type' => 'textfield',
'#title' => t('Speed at which the carousel rotates'),
'#default_value' => '3',
'#maxlength' => 5,
'#description' => t("The speed at which the carousel rotates."),
);
$form['advertisement_content'] = array
(
'#type' => 'radios',
'#title' => t('Advertisement Content Options'),
'#default_value' => variable_get( 'advertisement_content', 0 ),
'#options' => array
(
t('Images'),
t('Text'),
t('Images and Text'),
),
'#description' => t('Choose what content you would like displayed in your advertisement.'),
);
$form['advertisement_display'] = array
(
'#type' => 'radios',
'#title' => t('Advertisement Display Options'),