Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Drupal\Core\Form\FormStateInterface;
- function example_ajax_form_alter() {
- $ajax_form_request = \Drupal::request()->query->has(FormBuilderInterface::AJAX_FORM_REQUEST);
- if ($ajax_form_request) {
- if (!$form_state->isProcessingInput()) {
- \Drupal::logger('example')->notice('first pass');
- }
- else {
- \Drupal::logger('example')->notice('second pass');
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement