Skip to content
Advertisement

SweetAlert prompt with two input fields

Currently working on a personal project. I want the user to click a button and a SweetAlert prompt would be presented for the user to verify their credential. However, the code I see on the SweetAlert website only allows one input field. Here is the code I have:

JavaScript

So, is there a way I can get two input fields? One input field for the password and the other input field for text.

Advertisement

Answer

As far as I know you can’t do this off-the-shelf. You can either fork and implement, or just use a HTML element as a modal (e.g. as in Bootstrap’s modals).

Advertisement