Saturday 30 May 2015

Usage of system_settings_form() function

We can store the entered field values by default, if we use the form variables as variable names,
function custom_settings() {
$form['disclaimer_content'] = array(
           '#type' => 'textarea',
           '#required' => True,
           '#title' => t('Disclaimer Content'),
           '#default_value' => variable_get('disclaimer_content',''),
           '#description' =>  t('Enter Disclaimer content.'),
);
return system_settings_form($form);
}

No comments:

Post a Comment

Your comment is so valuable as it would help me in my growth of knowledge.