You are viewing beta documentation for Formie 4.x.
Reference

Notification

A Notification object represents one email notification attached to a form. A form can have more than one notification.

Properties

id

Type: int|null

The notification ID.

formId

Type: int|null

The form ID this notification belongs to.

templateId

Type: int|null

The email template ID, when one is selected.

pdfTemplateId

Type: int|null

The PDF template ID, when one is selected.

name

Type: string|null

The control panel name for the notification.

handle

Type: string|null

The notification handle.

enabled

Type: bool|null

Whether the notification is enabled.

subject

Type: string|null

The email subject.

recipients

Type: string

The recipient mode, such as email or conditions.

to

Type: string|null

The email address or variable content used for the To recipient.

toConditions

Type: array|null

Conditional recipient rules for the To recipient.

cc

Type: string|null

The email address or variable content used for the Cc recipient.

bcc

Type: string|null

The email address or variable content used for the Bcc recipient.

replyTo

Type: string|null

The reply-to email address or variable content.

replyToName

Type: string|null

The reply-to name or variable content.

from

Type: string|null

The sender email address.

fromName

Type: string|null

The sender name.

content

Type: string|null

The raw notification content.

attachFiles

Type: bool|null

Whether user-uploaded files should be attached.

attachPdf

Type: string|null

Whether a PDF should be attached.

enableConditions

Type: bool|null

Whether the notification has sending conditions enabled.

conditions

Type: array|null

The conditions used to decide whether the notification should send.

Methods

getParsedContent()

Returns: string

Returns the notification content as rendered HTML.

getToEmail()

Returns: string|null

Resolves the notification’s To recipient for a submission.

getStatusCondition()

Returns: string|null

Returns the status condition for a submission, when applicable.

renderTemplate()

Returns: string

Renders notification template content with supplied variables.

getTemplate()

Returns: verbb\formie\models\EmailTemplate|null

Returns the selected email template model, if one is set.

getPdfTemplate()

Returns: verbb\formie\models\PdfTemplate|null

Returns the selected PDF template model, if one is set.

getAssetAttachments()

Returns: array

Returns asset attachments for the notification.