You can submit a Github issue. Adding the "number" type seems fine, but we
should not add the "step" attribute.
Anthony
On Friday, June 5, 2015 at 12:26:00 AM UTC-4, Pavel Tyurikov wrote:
>
> Thanks for advice. I meen isn't it would be nice to have a defautl widget
> with right attrs set? I developing mobile-app and notiсed that if INPUT has
> a "number" type, the phone shows a numeric keyboard, on clicking on it. So
> I want to ask to add this functionality as deafult too.
>
> понедельник, 1 июня 2015 г., 21:19:28 UTC+3 пользователь Anthony написал:
>>
>> You can create a custom widget and then do:
>>
>> Field(..., widget=my_custom_widget)
>>
>> Alternatively, if you want to change all decimal widgets generated by
>> SQLFORM without having to bother specifying a custom widget for each field,
>> you could monkey patch gluon.sqlhtml.DecimalWidget or
>> gluon.sqlhtml.SQLFORM.widgets (change the "decimal" value to a custom
>> class).
>>
>> Anthony
>>
>>
>> On Monday, June 1, 2015 at 2:04:23 PM UTC-4, Pavel Tyurikov wrote:
>>>
>>> Is it possible to make SQLFORM default widget for decimal field like
>>> this:
>>> Field('quantity', 'decimal(5,2)', label = 'Price')
>>> <input type="number" step="0.01">
>>>
>>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.