function hook_views_slideshow_options_form_validate in Views Slideshow 7.3
Same name and namespace in other branches
- 8.3 views_slideshow.api.inc \hook_views_slideshow_options_form_validate()
- 6.3 views_slideshow.api.php \hook_views_slideshow_options_form_validate()
Form validation callback for the slideshow settings.
Related topics
1 function implements hook_views_slideshow_options_form_validate()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- views_slideshow_cycle_views_slideshow_options_form_validate in contrib/
views_slideshow_cycle/ views_slideshow_cycle.views_slideshow.inc - Implements hook_views_slideshow_options_form_validate().
1 invocation of hook_views_slideshow_options_form_validate()
- views_slideshow_plugin_style_slideshow::options_validate in ./
views_slideshow_plugin_style_slideshow.inc - Run any validation on the form settings.
File
- ./
views_slideshow.api.php, line 91 - Hooks provided by Views Slideshow.
Code
function hook_views_slideshow_options_form_validate(&$form, &$form_state, &$view) {
if (!is_numeric($form_state['values']['style_options']['views_slideshow_cycle']['speed'])) {
form_error($form['views_slideshow_cycle']['speed'], t('!setting must be numeric!', array(
'!setting' => 'Speed',
)));
}
if (!is_numeric($form_state['values']['style_options']['views_slideshow_cycle']['timeout'])) {
form_error($form['views_slideshow_cycle']['timeout'], t('!setting must be numeric!', array(
'!setting' => 'Timeout',
)));
}
if (!is_numeric($form_state['values']['style_options']['views_slideshow_cycle']['remember_slide_days'])) {
form_error($form['views_slideshow_cycle']['remember_slide_days'], t('!setting must be numeric!', array(
'!setting' => 'Slide days',
)));
}
}