You are here

function cmis_query_form_submit in CMIS API 6.3

Same name and namespace in other branches
  1. 6.4 cmis_query/cmis_query.module \cmis_query_form_submit()
  2. 6 cmis_query/cmis_query.module \cmis_query_form_submit()
  3. 6.2 cmis_query/cmis_query.module \cmis_query_form_submit()
  4. 7.2 cmis_query/cmis_query.module \cmis_query_form_submit()
  5. 7 cmis_query/cmis_query.module \cmis_query_form_submit()

Form submit for cmis_query_form - redirects to put query in url so we can use it on the results page

File

cmis_query/cmis_query.module, line 113
Search functions

Code

function cmis_query_form_submit($form, &$form_state) {
  if ($form_state['values']['cmis_query']) {
    $form_state['redirect'] = 'cmis/query/' . urlencode(urlencode(trim($form_state['values']['cmis_query'])));
  }
  else {
    $form_state['redirect'] = 'cmis/query';
    form_set_error('cmis_query_form', 'Please enter a query');
  }
}