flask_admin.form.fields
¶
- class TimeField(*args, **kwargs)[source]¶
A text field which stores a datetime.time object. Accepts time string in multiple formats: 20:10, 20:10:00, 10:00 am, 9:30pm, etc.
- class Select2Field(*args, **kwargs)[source]¶
Select2 styled select widget.
You must include select2.js, form-x.x.x.js and select2 stylesheet for it to work.
- iter_choices()[source]¶
Provides data for choice widget rendering. Must return a sequence or iterable of (value, label, selected, render_kw) tuples.
- pre_validate(form)[source]¶
Override if you need field-level validation. Runs before any other validators.
- Parameters:
form – The form the field belongs to.
- class Select2TagsField(*args, **kwargs)[source]¶
Select2Tags styled text field. You must include select2.js, form-x.x.x.js and select2 stylesheet for it to work.