Hook reference

ConfirmationEmail

class ConfirmationEmail

Sends a confirmation email to the user.

Parameters:
  • from (str) – From email address. This option is required.
  • message (str) – Confirmation message. Defaults to CONFIRMATION_MESSAGE.
  • subject (str) – Email subject. Defaults to CONFIRMATION_SUBJECT.
  • to (str) – To email address. Either a field name or an explicit value.

This hook sends a confirmation email to whomever submits the form. Like EmailForm, the default settings are designed to be adaptive and will throw exceptions if a value cannot be set.

EmailForm

class EmailForm

Emails the form data.

Parameters:
  • exclude_fields (arr) – An array of fields to exclude from the email.
  • from (str) – From email address. Either a field name or an explicit value.
  • from_name (str) – From name. Either a field name or an explicit value.
  • message_template (str) – Template from which to create the email body. Either a file path or a string.
  • subject (str) – Email subject.
  • to (str) – To email address. This option is required.

The default settings are designed to be adaptive, but EmailForm will throw an exception if a value cannot be found for a particular setting.

If the message_template is a string, EmailForm will replace {{ body }} with the automatically generated body, allowing you to specify a greeting and salutation without creating a dedicated template file.

FileUpload

class FileUpload

Handles file-upload logic.

This hook moves any files in the temporary upload directory to the root upload directory. Since hooks run after validation, the files are already approved and valid. This hook is necessary if your form contains any upload fields.

Table Of Contents

Previous topic

Validation reference

Next topic

Settings reference

This Page