Account created on 25 October 2021, about 3 years ago
#

Recent comments

this worked for me : https://www.drupal.org/project/drupal/issues/3368769#comment-15118911 🐛 10.1.x breaks Nginx + PHP-FPM with too many redirects even when nginx config is changed Closed: works as designed

Find a small workaround, you need to change the HTML structure of your button/input submit (done on 9.5.7) .

1) Remove the .js-form-submit (example here with twig)

<input{{ attributes.removeClass('js-form-submit') }} />{{ children }}

2) Add .js-form-item around your input

    $form['actions']['submit'] = [
      '#type' => 'submit',
      '#value' => t('Validate'),
      '#enabled' => FALSE,
      '#prefix' => '<div class="js-form-item">',
      '#suffix' => '</div>',
    ];

    $form['actions']['submit']['#states'] = [
      'enabled' => [
        [
          ':input[name="other_input"]' => ['empty' => FALSE],
        ],
      ],
    ];


Production build 0.71.5 2024