function splashify_admin_where_form_validate in Splashify 7
Same name and namespace in other branches
- 6 admin/splashify.admin.where.inc \splashify_admin_where_form_validate()
Implements form validation handler.
1 string reference to 'splashify_admin_where_form_validate'
- splashify_admin_where_form in admin/
splashify.admin.where.inc - "Where" settings tab.
File
- admin/
splashify.admin.where.inc, line 140 - The admin "Where" tab.
Code
function splashify_admin_where_form_validate($form, &$form_state) {
// If they have the opposite option checked, the "All" option should not be
// selected.
if (isset($form_state['values']['splashify_where_desktop_opposite'])) {
if ($form_state['values']['splashify_where_desktop_page'] == 'all' && $form_state['values']['splashify_where_desktop_opposite']) {
form_set_error('splashify_where_desktop_page', 'The "All" option cannot be selected when checking the "Opposite" option.');
}
}
if (isset($form_state['values']['splashify_where_mobile_opposite'])) {
if ($form_state['values']['splashify_where_mobile_page'] == 'all' && $form_state['values']['splashify_where_mobile_opposite']) {
form_set_error('splashify_where_mobile_page', 'The "All" option cannot be selected when checking the "Opposite" option.');
}
}
}