Contacts

Forms for creating and modifying contact objects

Contact Form

class integreat_cms.cms.forms.contacts.contact_form.ContactForm(**kwargs: Any)[source]

Bases: CustomModelForm

Form for creating and modifying contact objects

Form fields:

Parameters:

kwargs (Any)

__init__(**kwargs: Any) None[source]

Initialize placeholder model form

Parameters:

**kwargs (Any) – The supplied keyword arguments

Raises:

TypeError – If form is instantiated directly without an inheriting subclass

Return type:

None

clean() dict[str, Any][source]

Validate the selected location, see django.forms.Form.clean()

Returns:

The cleaned form data

Return type:

dict[str, Any]

clean_mobile_phone_number() str[source]

Validate the mobile phone number field (see Overriding the clean() method). The number will be converted to the international format, i.e. +XX (X) XXXXXXXX.

Returns:

The reformatted phone number

Return type:

str

clean_phone_number() str[source]

Validate the phone number field (see Overriding the clean() method). The number will be converted to the international format, i.e. +XX (X) XXXXXXXX.

Returns:

The reformatted phone number

Return type:

str

property media[source]

Return all media required to render the widgets on this form.

validate_opening_hours() list[dict[str, Any]] | None[source]

Validate the opening hours field (see Overriding the clean() method).

Returns:

The valid opening hours

Return type:

list[dict[str, Any]] | None