Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I best manage multiple twitter bootstrap modal dialogs

I am currently working on a web project that makes heavy use of twitter bootstrap modal dialogs. In essence, the user is shown a lot of modal dialogs with forms consecutively. The order of these dialogs is based on the values he provides on each form (= dialog).

How can I best manage the state of the different modals and write filters for the order of them showing up?

Thanks.

like image 534
hofimax Avatar asked Jan 05 '12 00:01

hofimax


People also ask

How do I edit a bootstrap modal?

<button type="button" class="btn btn-sm btn-primary fas fa-pencil-alt noUnderlineCustom text-white" data-toggle="modal" data-target="#editModal"></button> This is a HTML code that compose the editing button. data-toggle="modal" This attribute activates the Bootstraps Modal without using JS.

How do I stop bootstrap modal pop up?

Clicking on the modal “backdrop” will automatically close the modal. Bootstrap only supports one modal window at a time.

How do I center a bootstrap modal vertically?

Add . modal-dialog-centered to . modal-dialog to vertically center the modal.

What is data BS dismiss?

The .modal-header class is used to define the style for the header of the modal. The <button> inside the header has a data-dismiss="modal" attribute which closes the modal if you click on it.


1 Answers

I use this extension to bootstrap to work with modal forms:

https://github.com/Nikku/jquery-bootstrap-scripting

see a demo of the features here:

http://nikku.github.com/jquery-bootstrap-scripting/

Pretty awesome and makes it easy to have modal forms that are effectively wizards (which it sounds like you are describing)

like image 56
ahmeij Avatar answered Oct 24 '22 16:10

ahmeij