You are here

function tvi_validate_handler in Taxonomy Views Integrator 6

Same name and namespace in other branches
  1. 7 includes/tvi.admin.inc \tvi_validate_handler()

Validate the TVI administration form submission.

If the view and the display do not line up, throw an error.

See also

tvi_taxonomy_admin_form().

tvi_submit_handler().

Related topics

1 string reference to 'tvi_validate_handler'
tvi_taxonomy_admin_form in includes/tvi.admin.inc
Form builder for the main TVI administration form.

File

includes/tvi.admin.inc, line 186
TVI Administration Interface

Code

function tvi_validate_handler($form, &$form_state) {
  $values = $form_state['values']['tvi'];
  $view = views_get_view($values['view_name']);
  list($view_name, $display_name) = explode(':', $values['display']);
  $form_state['values']['tvi']['display'] = $display_name;
  if ($view->name != $view_name) {
    form_set_error('tvi][display', t("You must select a display from the selected view. You wouldn't have this problem if you enable Javascript."));
  }
}