bookmark_borderNotification

Introduction

The Notification object contains the settings for the administrator’s notification, such as destination email address, email subject and body. It is defined as an associative array. For more details on managing your notifications, see the Notifications page.

This article relates to the Notification object used in Gravity Forms 1.6 and earlier. The Notifications Object was introduced in Gravity Forms 1.7.

Usage

$form["notification"]["bcc"];     //returns the BCC email address
$form["notification"]["subject"]; //returns the email subject

Properties

  • to string

    Contains the notification destination email address(es). For multiple emails, separate them with a comma (,) (i.e. email1@test.com, email2@test.com).

  • from string

    If specified, forces the email to be sent from this address. If not specified, the email address configured in WordPress will be used.

  • fromField string

    Id of an email field on the form whose value should be used as the from address.

  • replyTo string

    Contains the email address to be used as the reply to email address.

  • replyToField string

    Id of an email field on the form whose value should be used as the reply to email address.

  • bcc string

    Contains the email address to be used as the bcc email address.

  • subject string

    Contains the subject of the email.

  • message string

    Contains the body/content of the email.

  • disableAutoformat boolean

    Determines if the email message should be formatted so that paragraphs are automatically added for new lines. 1 disables auto-formatting, 0 enables auto-formatting.

  • routing array

    Allows notifications to be routed to different email addresses based on field values entered on the form. This array contains multiple routing rules. Each rule is evaluated separately and the notification will be sent to all rules that match.

        $form["notification"]["routing"][0]["email"]; //returns the email of the first routing rule
        

    Following are the properties or each routing rule

    • fieldId integer

      Target field Id. Field that will have it’s value compared with the value property to determine if this rule is a match

    • operator string

      Operator to be used when evaluating this rule.

      Possible values: is, isnot

      • is: Evaluates this rule to true when the value property is equal to the value of field specified by fieldId.
      • isnot: Evaluates this rule to true when the value property is not equal to the value of field specified by fieldId.
    • value string

      The value to compare with the field specified by fieldId