web2py.gluon.sqlhtml.FormWidget

Package web2py :: Package gluon :: Module sqlhtml :: Class FormWidget |
[hide private]
[frames] | no frames]

# Class FormWidget

source code

    object --+
             |
            FormWidget

Known Subclasses:
  BooleanWidget, OptionsWidget, StringWidget, PasswordWidget, TextWidget, UploadWidget

helper for SQLFORM to generate form input fields (widget), related to the fieldtype

Instance Methods | [hide private]
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__init__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Methods | [hide private]
_attributes(cls, field, widget_attributes, **attributes) helper to build a common set of attributes... | source code
widget(cls, field, value, **attributes) generates the widget for the field. | source code

Class Variables | [hide private]
| _class = ``'``generic-widget``'``

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### _attributes(cls, field, widget_attributes, **attributes) Class Method | source code
    helper to build a common set of attributes

    :param field: the field involved,
                  some attributes are derived from this
    :param widget_attributes:  widget related attributes
    :param attributes: any other supplied attributes

### widget(cls, field, value, **attributes) Class Method | source code
    generates the widget for the field.

    When serialized, will provide an INPUT tag:

    - id = tablename_fieldname
    - class = field.type
    - name = fieldname

    :param field: the field needing the widget
    :param value: value
    :param attributes: any other attributes to be applied