+ 5
How to use Sweet Alert to replace prompt function ?
I used type: "input" to use swal as prompt but it's not working... Can you help me ? 😅
6 Antworten
+ 4
:D
Well, I usually prefer write my own 'sweet cool' alert/prompt/confirm when I do not want use os modal built-in JS ones ^^
See how I integrate a complete and extended original JS class to replace the 3 built-in boxes in this code:
https://code.sololearn.com/Wp8x1NemoYJ1/#html
+ 5
https://code.sololearn.com/WlSiILvqHwd9/?ref=app
Not a prompt replacement one, but an confirm: not difficult to adapt it by adding text field and returning its value (or reading it at anytime anywhere ^^)
Feel free to request for help if you fail doing yourself ;)
+ 4
@visph it's not sweet alert... I think ? 😶
+ 3
@Ekansh: What are you calling << sweet alert >>? @@
Anyway, the prompt/input version:
https://code.sololearn.com/WO2Mz12InjfP/?ref=app
^^
0
Swal ain't a thing