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.

process_formdata(valuelist)[source]

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

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.

process_data(value)[source]

Process the Python data applied to this field and store the result.

This will be called during form construction by the form’s kwargs or obj argument.

Parameters:

value – The python object containing the value to process.

process_formdata(valuelist)[source]

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

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.

process_formdata(valuelist)[source]

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.