Answer the question
In order to leave comments, you need to log in
How to open second modal after validation?
Hello.
There is a modal window with forms and a validator 1000hz.github.io/bootstrap-validator . The validator prevents the button from being clicked until the user enters the correct information. It is necessary after checking (if everything is correct), close the current window and display the second one, with gratitude. How to implement?
<input data-dismiss="modal" data-toggle="modal" data-target="#thanks" type="submit" value="Отправить" class="btn btn-primary btn-block">
Answer the question
In order to leave comments, you need to log in
$('#form').validator().on('submit', function (e) {
if (!e.isDefaultPrevented()) {
$('#firstModal').modal('hide');
$('#secondModal').modal('show');
}
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question