8.2.10.4.2.6. ContactForm¶
- class ContactForm(*args, **kwargs)[source]¶
Methods
__contains__Returns True if the named field is a member of this form.
__delattr__Implement delattr(self, name).
__delitem__Remove a field from this form.
__dir__Default dir() implementation.
__eq__Return self==value.
__format__Default object formatter.
__ge__Return self>=value.
__getattribute__Return getattr(self, name).
__getitem__Dict-style access to this form's fields.
__getstate__Helper for pickle.
__gt__Return self>value.
__hash__Return hash(self).
__init_subclass__This method is called when a class is subclassed.
__iter__Iterate form fields in creation order.
__le__Return self<=value.
__lt__Return self<value.
__ne__Return self!=value.
__new____reduce__Helper for pickle.
__reduce_ex__Helper for pickle.
__repr__Return repr(self).
__setattr__Implement setattr(self, name, value).
__setitem__Bind a field to this form.
__sizeof__Size of object in memory, in bytes.
__str__Return str(self).
__subclasshook__Abstract classes can override this to customize issubclass().
hidden_tagRender the form's hidden fields in one call.
is_submittedConsider the form submitted if there is an active request and the method is
POST,PUT,PATCH, orDELETE.populate_objPopulates the attributes of the passed obj with data from the form's fields.
processProcess default and input data with each field.
validateValidate the form by calling
validateon each field.validate_on_submitCall
validate()only if the form is submitted.- __init__(*args, **kwargs)¶
- Parameters:
formdata – Input data coming from the client, usually
request.formor equivalent. Should provide a “multi dict” interface to get a list of values for a given key, such as what Werkzeug, Django, and WebOb provide.obj – Take existing data from attributes on this object matching form field attributes. Only used if
formdatais not passed.prefix – If provided, all fields will have their name prefixed with the value. This is for distinguishing multiple forms on a single page. This only affects the HTML name for matching input data, not the Python name for matching existing data.
data – Take existing data from keys in this dict matching form field attributes.
objtakes precedence if it also has a matching attribute. Only used ifformdatais not passed.meta – A dict of attributes to override on this form’s
metainstance.extra_filters – A dict mapping field attribute names to lists of extra filter functions to run. Extra filters run after filters passed when creating the field. If the form has
filter_<fieldname>, it is the last extra filter.kwargs – Merged with
datato allow passing existing data as parameters. Overwrites any duplicate keys indata. Only used ifformdatais not passed.
Attributes
__dict____weakref__list of weak references to the object
dataerrors- name = <UnboundField(StringField, (<babel.support.LazyProxy object>,), {'validators': [<flask_security.forms.RequiredLocalize object>]})>¶
- email = <UnboundField(EmailField, (<babel.support.LazyProxy object>,), {'render_kw': {'autocomplete': 'email'}, 'validators': [<flask_security.forms.RequiredLocalize object>, <flask_security.forms.EmailValidation object>]})>¶
- subject = <UnboundField(StringField, (<babel.support.LazyProxy object>,), {'validators': [<flask_security.forms.RequiredLocalize object>]})>¶
- message = <UnboundField(StringField, (<babel.support.LazyProxy object>,), {'validators': [<flask_security.forms.RequiredLocalize object>]})>¶
- recaptcha = <UnboundField(RecaptchaField, ('g-recaptcha-response',), {})>¶
- __annotations__ = {}¶
- __doc__ = None¶
- __module__ = 'schedula.utils.form.server.contact'¶
- _unbound_fields = None¶
- _wtforms_meta = None¶