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.