public function DashboardForm::submitFormAjax in Opigno statistics 8
Ajax form submit.
File
- src/
Form/ DashboardForm.php, line 643
Class
- DashboardForm
- Implements the statistics dashboard.
Namespace
Drupal\opigno_statistics\FormCode
public function submitFormAjax(array &$form, FormStateInterface &$form_state) {
$trigger = $form_state
->getTriggeringElement();
if (isset($trigger['#name']) && $trigger['#name'] == 'year') {
$form['trainings_progress']['month']['#value'] = 'none';
}
return $form['trainings_progress'];
}