Created
June 27, 2017 18:21
-
-
Save MatthieuScarset/fe4413e174d674f11197b03c6957def6 to your computer and use it in GitHub Desktop.
Drupal 8 - Test if is an Ajax Form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($form_state->getUserInput()['_drupal_ajax']) { | |
// Display message into the Ajax form returned. | |
$form['warnings'] = ['#type' => 'status_messages', '#weight' => -1]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment