Hello,
So, I have a popup dialog that has a partial page container in it.
It works fine where when a person clicks a button, the popup dialog shows up and the call is made to get the partial page.
The problem is, on that partial page, there are required fields, and I have it set where, if the user clicks a button on that partial page, it can only toggle the popup if the form validates.
When I test it, and don't fill in a mandatory field, the popup dialog still toggles. (On the event tab, under onClick, I have if form validates, then toggle the popup dialog)
How can I fix that?
So, I have a popup dialog that has a partial page container in it.
It works fine where when a person clicks a button, the popup dialog shows up and the call is made to get the partial page.
The problem is, on that partial page, there are required fields, and I have it set where, if the user clicks a button on that partial page, it can only toggle the popup if the form validates.
When I test it, and don't fill in a mandatory field, the popup dialog still toggles. (On the event tab, under onClick, I have if form validates, then toggle the popup dialog)
How can I fix that?
RE: Popup Dialog Validations
In order for the dialog to be positioned correctly, its content actually gets moved outside the form in the HTML.
As a result, when the partial page content is loaded into the dialog it is not actually within the 'form'.
Therefore to make sure the correct fields are being validated the easiest option is to change your condition from 'Form Validates' to 'Group Validates'. You can then pick the group that contains all the contents to validate.
If you don+?+?+?t have a suitable group on your partial page, then use the 'Enter group name' option, and type in the name of the dialog content group from the main page. This should be 'popup_dialog_content' unless you have manually changed it.
I hope this helps. Please let me know if you have any questions.
Regards,
Gerard
RE: Popup Dialog Validations