?
First of all i must say the sweetalert prompt is a beautiful addition made
my ui much more subtle.Thanks and well done.
I'm trying to add an initial parameter in the prompt box like in
javascript's prompt.
E.g prompt('This is the prompt', 'Initial parameter in the prompt box ');
Looking forward to hearing back from you.
On Wed, Apr 1, 2015 at 11:57 AM, Tristan Edwards [email protected]
wrote:
?
—
Reply to this email directly or view it on GitHub
https://github.com/t4t5/sweetalert/issues/321#issuecomment-88439615.
I want this function, too. Thanks
+1 shouldn't be too hard to add :)
try
$('input').val(startValue);
using jQuery with your startValue after swal() call
Would be great if this could be added as a property in the swal() call.
For now I've got it working but I feels 'hacky':
Code:
jQuery('.sweet-alert input[type=text]:first' ).val('the val');
+1
+1
This is available in the latest version through inputValue: 'someValue'! :)
+1
inputValue: "value here"
inputValue: "value here"
This doesn't work for me
swal({
content: {
element: "input",
attributes: {
placeholder: "Type your password",
type: "password",
value: "Your value"
},
},
});
Most helpful comment
inputValue: "value here"