function flexslider_form_optionset_add_submit in Flex Slider 7
Same name and namespace in other branches
- 7.2 flexslider.admin.inc \flexslider_form_optionset_add_submit()
Submit handler for adding a new option set.
File
- ./
flexslider.admin.inc, line 74 - Administrative page callbacks for the flexslider module.
Code
function flexslider_form_optionset_add_submit($form, &$form_state) {
ctools_include('export');
$optionset = ctools_export_crud_new('flexslider_optionset');
$optionset->name = $form_state['values']['name'];
$optionset->title = $form_state['values']['title'];
$optionset->options = array();
$saved = ctools_export_crud_save('flexslider_optionset', $optionset);
drupal_set_message(t('Option set %name was created.', array(
'%name' => $optionset->name,
)));
$form_state['redirect'] = 'admin/config/media/flexslider/edit/' . $optionset->name;
}