+ 4
How to switch between two modals in bootstrap4?
i am making a pop up login and sign up form so i want user to switch between login and sign.so there will be two modals.so how can i switch between em?
5 ответов
+ 2
Voxel Hassan Saed Sergei No thank you all for giving me suggestions on how i can fix it ,i found a way to do that.i used the onclick function in the button and it worked for me.thanks again guys!
+ 1
1. could try to switch only form inside popup
2. https://code.sololearn.com/WM269dV3I6ne/?ref=app
try to use this approach, I’m just tried to switch them by default controls but it shows two modals at the same time
0
I think you could have your button to switch between them call some JS onclick like:
$('#signup').modal('hide');
And have one of these in your script:
$('#signup').on('hidden.bs.modal', function (e) {
$('#login').modal('show');
});
And vise versa for your switch back to signup.
0
I think you should create 2 buttons, one for register and it should triggers the modal with your register form when clicked and the other button triggers the login modal
- 1
artkrantipub.com/rollback