Skip to content
New issue

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

HTML form #284

Closed
danreeves opened this issue Feb 17, 2015 · 2 comments
Closed

HTML form #284

danreeves opened this issue Feb 17, 2015 · 2 comments

Comments

@danreeves
Copy link
Contributor

I've been trying to put a form inside the alert as html which works nicely. Unfortunately swal likes to take the focus for its own buttons.

Looking through issues/prs I see there is support for a prompt type but I'm wondering if it wouldn't be better to handle custom html (with forms) nicer rather than implement more features. This could probably be solved with a small amount of code which tests if there are inputs in the text and focusing the first instead.

Wanted to know what you think, as I think this would be more extensible than the prompt feature.

@t4t5
Copy link
Owner

t4t5 commented Feb 17, 2015

At its current state, SweetAlert is really not made for handling complex HTML.

The plan I have in mind is to get the simple alert/prompt functionality as stable and nice as possible first.

Once that's done, I think we can start expanding the functionality of SweetAlert to be more of a general popup library where you can add your own markup and just reference the element to "Sweetify" it. But I think we should be careful to jump into that too soon when the basics are still changing. If (or when) we do it, it should be thought through and done right. :)

@danreeves
Copy link
Contributor Author

Makes sense to me. Thanks for the quick reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants