166
rated 0 times
[
168]
[
2]
/ answers: 1 / hits: 108303
/ 9 Years ago, thu, july 16, 2015, 12:00:00
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:
swal({
title: Authenicating for continuation,
text: Test,
type: input,
showCancelButton: true,
closeOnConfirm: false,
animation: slide-from-top,
inputPlaceholder: Write something
}, function(inputValue) {
if (inputValue === false) return false;
if (inputValue === ) {
swal.showInputError(You need to write something!);
return false
}
// swal(Nice!, You wrote: + inputValue, success);
});
So, is there a way I can get two input fields? One input field for the password and the other input field for text.
More From » prompt