Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
After installation i have noticed that for anonymous users only, some forms buttons are being ajaxified.
For example i have a page with two forms loaded (webform & user login). When i submit webform, an ajax request is made with an error.
The error is logged as Invalid form POST data. This is normal as its no supposed to be ajaxed.
Tried this and it worked fine.
In ajax_register.module after line 250 add following two lines:
$form['actions']['login_submit'] = $form['actions']['submit'];
unset($form['actions']['submit']);
Above code will make sure not to attach ajax to similar buttons on other forms.
Any better solutions?
Comments
Comment #2
fadi.assaad CreditAttribution: fadi.assaad commentedThis is fixed simply by disabling user-login block then to load user-login through ajax links.
Used a custom ajax link the same one found in ajax_register.module _ajax_register_ajax_links function.