If you are talking about using SQLFORM with a DAL table, when you define Field objects, you can specify a custom widget via the "widget" argument -- it must be a callable object that takes a Field object and a value. For more details, see
http://web2py.com/books/default/chapter/29/07/forms-and-validators#Widgets.
Also, you can create any custom HTML tag using the TAG helper:
TAG['ons-input'](_type='text', _value='hello')
produces:
<onui-input type="text" value="hello"></onui-input>
Note, if you simply use the TAG helper to generate markup, you won't get the validation behavior of the standard INPUT helper. As an alternative, you can create a custom tag based on the INPUT helper:
class OnsInput(INPUT):
tag = 'ons-input'
You could then do:
OnsInput(_type='text', _value='hello', requires=db.myfield.requires)
The above will produce the same HTML markup, but the resulting Python object will also be able to validate its input. You could do the same for the SELECT helper.
Based on the above, you could create custom widgets -- see the various widget classes in gluon.sqlhtml. Once you've got some custom widgets, you could then monkey patch SQLFORM.widgets by overwriting some or all of its items with your custom classes -- then your custom widgets will be the defaults used by SQLFORM.
Anthony