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.
The ID of, e.g., the user_login form changes to reflect the number of times the form has been submitted in this dialog.
Would it be possible to add the "original" ID of the form as a class so that it can be used for CSS? As it stands, there's no way to write CSS targeting elements in a specific form in the the Modal Forms dialog.
Comments
Comment #1
JieXiannn CreditAttribution: JieXiannn commentedI've had this problem too, and I've managed a simple workaround by modifying the .js files in sites\all\modules\modal_forms\js so that the login, pass and register form, uses different classes, ie one each of the available
ctools-modal-modal-popup-large
ctools-modal-modal-popup-medium
ctools-modal-modal-popup-small
Luckily for me I only use 3 forms and I only needed the unique ids to style the dimensions of each popup form, hence this workaround works fine.
Comment #2
Marko B CreditAttribution: Marko B commentedYes you can hack values there. Or some config could be added to admin page and then variables passed the same way there is cTools variable passed in
modal_forms_popup.js file
html += ' <span class="popups-close close">' + Drupal.CTools.Modal.currentSettings.closeText + '</span>';