We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First of all thanks for keeping this nice plugin alive!
So I was wondering if you could add a option to give an array of attributes to an input type, so I can add maxlenght to the input field for example.
I am using this:
title: 'Test', text: 'Enter some text', type: "input", showCancelButton: true, closeOnConfirm: false, showLoaderOnConfirm: true
The text was updated successfully, but these errors were encountered:
Update(June 2018): There's a better way now:
swal({ title: 'Maxlength', input: 'text', inputAttributes: { maxlength: 32 } })
Live demo: https://jsfiddle.net/ad3quksn/1642/
The answer below is still supported, but outdated:
You can do whatever you want within the html parameter:
html
swal({ title: 'Maxlength', html: '<p><input id="input-field" maxlength="32">' });
Sorry, something went wrong.
Okay thanks!
No branches or pull requests
First of all thanks for keeping this nice plugin alive!
So I was wondering if you could add a option to give an array of attributes to an input type, so I can add maxlenght to the input field for example.
I am using this:
title: 'Test', text: 'Enter some text', type: "input", showCancelButton: true, closeOnConfirm: false, showLoaderOnConfirm: true
The text was updated successfully, but these errors were encountered: