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

cppcms::widgets::numeric<int> does not render as <input type="number"> #73

Open
idkCpp opened this issue Apr 4, 2020 · 1 comment
Open

Comments

@idkCpp
Copy link

idkCpp commented Apr 4, 2020

cppcms/form.h

 993:                template<typename T>
 994:                class numeric: public base_html_input {
 995:                public:
 996:                        numeric() :
 997:                                base_html_input("text"),
 998:                                check_low_(false),
 999:                                check_high_(false),
1000:                                non_empty_(false)
1001:                        {
1002:                        }

Why is it base_html_input("text") and not base_html_input("number")?

I assume T may only be one that satisfies std::is_arithmetic, that is integral, unsigned and floating-point types. That maybe should be static_asserted and for those types an input of type="number" would be better than text would it not?

@masaoliou
Copy link

I tend to feel cppcms::form has not optimized for html5, yet.

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