gpnf_should_send_notification

  1. Description
  2. Usage
  3. Parameters
  4. Examples
  5. Since

Description

Indicate whether a notification should be sent by context (parent or child submission).

Usage

Apply to all Nested Form fields on all forms.

add_filter( 'gpnf_should_send_notification', '__return_true' );

Apply to all Nested Form fields on a specific form.

add_filter( 'gpnf_should_send_notification_FORMID', '__return_true' );

Apply to a specific Nested Form field on a specific form.

add_filter( 'gpnf_should_send_notification_FORMID_FIELDID', '__return_true' );

Parameters

  • should_send_notification bool

    Whether the notification should be sent for the given context.

  • notification array

    The notification object.

  • context string

    The current context for which notifications are being processed; ‘parent’ is a parent form submission; ‘child’ is a nested form submission.

  • parent_form array

    The parent form object.

  • nested_form_field array

    The field object of the Nested Form field.

  • entry array

    The current entry for which feeds are being processed.

  • child_form array

    The child form object.

Examples

<?php
/**
 * Gravity Perks // Nested Forms // Send Nested Form notification when child entry is submitted
 * https://gravitywiz.com/documentation/gravity-forms-nested-forms/
 */
add_filter( 'gpnf_should_send_notification', function( $should_send_notification, $notification, $context ) {
	return $context == 'child';
}, 10, 3 );

Since

This filter is available since Gravity Forms Nested Forms 1.0-beta-4.10.