For each widgets, the default class attributes.
A list of possible values, which will be rendered as a <datalist> element tied to the input. Note that the list of options passed as datalist elements are only suggestions and are not related to form validation.
A path to a template that should be used to render this widget. You can change the template name per instance by passing in a keyword argument called template_name. This will override the default that is set by the widget class. You can also change the template used for rendering by an argument to the Input.render() method. See more about exchanging the templates in the documentation about customization.
'floppyforms/password.html'
password
'floppyforms/slug.html'
text
An text input that renders as <input pattern="[-\w]+" ...> for client-side validation of the slug.
'floppyforms/ipaddress.html'
text
An text input that renders as <input pattern="..." ...> for client-side validation. The pattern checks that the entered value is a valid IPv4 address.
'floppyforms/clearable_input.html'
file
_('Currently')
_('Change')
_('Clear')
The initial_text, input_text and clear_checkbox_label attributes are provided in the template context.
'floppyforms/phonenumber.html'
tel
'floppyforms/date.html'
date
A widget that renders as <input type="date" value="...">. Value is rendered in ISO-8601 format (i.e. YYYY-MM-DD) regardless of localization settings.
'floppyforms/datetime.html'
datetime
'floppyforms/number.html'
number
None
None
None
min, max and step are available in the attrs template variable if they are not None.
'floppyforms/range.html'
range
None
None
None
min, max and step are available in the attrs template variable if they are not None.
'floppyforms/textarea.html'
10
40
rows and cols are available in the attrs variable.
'floppyforms/checkbox.html'
checkbox
The same as django.forms.widgets.MultiWidget. The rendering can be customized by overriding format_output, which joins all the rendered widgets.
Displays a DateInput and a TimeInput side by side.
A multiple <input type=”hidden”> for fields that have several values.
A widget that displays three <select> boxes, for the year, the month and the date.
Available context:
The template used to render the widget. Default: 'floppyforms/select_date.html'.
A tuple representing the value to display when there is no initial value. Default: (0, '---').
The way the day field’s name is derived from the widget’s name. Default: '%s_day'.
The way the month field’s name is derived. Default: '%s_month'.
The way the year field’s name is derived. Default: '%s_year'.