cppcms icon indicating copy to clipboard operation
cppcms copied to clipboard

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

Open idkCpp opened this issue 5 years ago • 1 comments

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?

idkCpp avatar Apr 04 '20 14:04 idkCpp

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

masaoliou avatar Apr 17 '20 07:04 masaoliou