function bootstrap_tour_configure_remove_tooltip_submit in Bootstrap Tour 7
Remove a tooltip from the configuration form
_state
Parameters
array $form:
1 string reference to 'bootstrap_tour_configure_remove_tooltip_submit'
- bootstrap_tour_configure_form in ./
bootstrap_tour.admin.inc - Implements hook_form()
File
- ./
bootstrap_tour.admin.inc, line 333
Code
function bootstrap_tour_configure_remove_tooltip_submit($form, &$form_state) {
// Determine correct step
$values = explode('-', end($form_state['clicked_button']['#array_parents']));
$step = $values[2];
// Decrease the amount of tooltips
if ($form_state['storage']['guided tours']['tooltips'][$step] > 1) {
$form_state['storage']['guided tours']['tooltips'][$step]--;
}
// Signalize Drupal to rebuild the form
$form_state['rebuild'] = true;
$form_state['storage']['guided tours']['modified step'] = $step;
$form_state['storage']['guided tours']['modified tooltip'] = $form_state['storage']['guided tours']['tooltips'][$step] - 1;
}