3 namespace Drupal\form_test\Form;
5 use Drupal\Core\Form\FormBase;
6 use Drupal\Core\Form\FormStateInterface;
9 * Form to test whether GET forms have a CSRF token.
11 class FormTestGetForm extends FormBase {
16 public function getFormId() {
17 return 'form_test_get_form';
23 public function buildForm(array $form, FormStateInterface $form_state) {
24 $form['#method'] = 'get';
35 public function submitForm(array &$form, FormStateInterface $form_state) {
36 drupal_set_message('The form_test_get_form form has been submitted successfully.');