function bootstrap_tour_configure_add_tooltip_submit in Bootstrap Tour 7
Adds a tooltip to the configuration form
_state
Parameters
array $form:
1 string reference to 'bootstrap_tour_configure_add_tooltip_submit'
- bootstrap_tour_configure_form in ./
bootstrap_tour.admin.inc - Implements hook_form()
File
- ./
bootstrap_tour.admin.inc, line 313
Code
function bootstrap_tour_configure_add_tooltip_submit($form, &$form_state) {
// Determine correct step
$values = explode('-', end($form_state['clicked_button']['#array_parents']));
$step = $values[2];
// Increase the amount of tooltips
$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;
}