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.
We'd like to hide the registration form if your emailadres is already in use. As far as we can see, friendly_register does not have any hooks after the JSON call is performed.
Calling Drupal.attachBehaviors() at the end of the getJSON()'s in Drupal.friendly_register.checkUserName() and Drupal.friendly_register.checkEmail() fixes this, but this also re-attaches the friendly_register exponentially ;)
This can be fixed by adding a once() in the focus() attachments: userName.field.once('friendly_register').focus(function () {
A patch is on it's way!
Comment | File | Size | Author |
---|---|---|---|
#1 | friendly_register-attachbehaviors-2483141-1.patch | 1.61 KB | MrHaroldA |
Comments
Comment #1
MrHaroldA CreditAttribution: MrHaroldA commentedHere 'ya go!
Comment #2
MrHaroldA CreditAttribution: MrHaroldA commentedComment #3
Andrew M Riley CreditAttribution: Andrew M Riley commentedThanks for the patch MrHaroldA. These patches appear to work on the 8.x branch, did you mean for it to work there or in the 7.x branch?
Comment #5
Andrew M Riley CreditAttribution: Andrew M Riley commentedI've manually added this to 7.x while I try to get the 8.x version and 7.x version to match up in the existing JS.
Comment #6
MrHaroldA CreditAttribution: MrHaroldA commentedYeah, these patches are against the master branch; I patched my 7.x installation manually here ;)
Comment #7
Andrew M Riley CreditAttribution: Andrew M Riley commentedComment #9
Albert Volkman CreditAttribution: Albert Volkman commentedThanks @MrHaroldA!
Comment #10
Albert Volkman CreditAttribution: Albert Volkman commented