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.


JieXiannn’s picture

Issue summary: View changes

I'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


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.

Marko B’s picture

Yes 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>';