function brightcove_field_filter_form_submit in Brightcove Video Connect 7.6
Same name and namespace in other branches
- 7.7 brightcove.module \brightcove_field_filter_form_submit()
- 7.2 brightcove_field/brightcove_field.module \brightcove_field_filter_form_submit()
- 7.3 brightcove_field/brightcove_field.module \brightcove_field_filter_form_submit()
- 7.4 brightcove_field/brightcove_field.module \brightcove_field_filter_form_submit()
- 7.5 brightcove_field/brightcove_field.module \brightcove_field_filter_form_submit()
Submit callback for brightcove_field_filter_form().
Set session variables based on selection.
See also
1 string reference to 'brightcove_field_filter_form_submit'
- brightcove_field_filter_form in ./
brightcove.module - Filter form for video browser.
File
- ./
brightcove.module, line 1361 - Brightcove module is an integration layer between any modules using Brightcove API. It makes all necessary checks for the API and makes settings available to the user.
Code
function brightcove_field_filter_form_submit($form, &$form_state) {
$keywords = $form_state['values']['keywords'];
// Reset the form if keywords are empty or reset button was clicked.
if (empty($keywords) || $form_state['clicked_button']['#name'] == 'reset') {
unset($_SESSION['brightcove_field_filter']['search']);
unset($_SESSION['brightcove_field_filter']['keywords']);
return;
}
// The only thing we do is set session variables based on the selection.
// Browse callback will take care of the rest.
$_SESSION['brightcove_field_filter']['keywords'] = $keywords;
$_SESSION['brightcove_field_filter']['search'] = $form_state['values']['search'];
// Go to the first page of results.
unset($_GET['page']);
}