Open paltman opened 11 years ago
There's also a case 1.5 : redisplay a form that came back from the server with errors.
At times it's also desirable to have client side javascript validation of the form inputs, with the SUBMIT button disabled until the form validates (example: you must supply one of the following: email address or phone number).
There was a partial attempt at this in #13 which I closed after suggesting a work around, but it would be nice to have the modals driven via declarative markup.
Use Cases
a.ajax
click fetchesCases 1 and 2 are fairly easy to solve (at least I am pretty sure), the case in number 3 is a bit tricky as we want to avoid the modal closing and reopening and want the modal to just replace the insides instead of flashing about on the screen. One approach would be to have secondary fragments that were just replaced and not the entire
div.modal
but that could get out of hand in managing a ton of different templates.Open to ideas/suggestions on this.
Currently, I think the best work around there is for this is to load the modal fragment as hidden and have the following script fragment to remove excess backgrounds and show the modal (this seems to work for me for most cases but would like to alleviate the need of evening having to do this):
where
#my-modal
is referencing the id you place your modal div to make it unique.