PDA

View Full Version : Modal of a modal and submit



mrkite79
02-15-2016, 03:50 PM
Hi, I'm new to bootstrap.
I've got a modal A where I see person attributes. Here I have a "add button" that opens a new modal where i can insert specifications (for example a list of addresses) of the person shown in modal A.
How can I reload modal A after modal B submit, so that I can see the new address inserted in modal B?

Thanx to everyone

dows
02-23-2016, 07:57 AM
Multiple modals are not supported by default (see the first warning at http://getbootstrap.com/javascript/#modals).
But you can try this:

Open the modal "person attributes" [1]
A click on "add" closes the modal [1] and opens the modal "new address" [2]
A click on "save" saves the data (obviously), closes modal [2] opens modal [1]
Here you get the updated list of addresses (may be the address inserted last is by default on top)


See modal events (https://getbootstrap.com/javascript/#modals-events) to see how you fetch the closing of a modal.

mrkite79
02-23-2016, 08:23 AM
Great!
Thank you dows...I'll try it asap
In the meanwhile I choosed to open person page not as a modal to make it working.