Hook: mam_gravity_forms_after_form_processed_{form-id}

Purpose

Per-form post-processing filter fired after Gravity Forms native processing completes — including conditional-logic evaluation, calculations, and GF’s own confirmation generation. Subscribers can read the final entry state, fire side effects, and contribute to the result envelope.

Distinct from mam_for_gravity_forms_form_submitted_{form-id} (which fires earlier, just after the entry is inserted but before GF’s full post-processing).


Signature

$result = apply_filters(
    'mam_gravity_forms_after_form_processed_' . $form_id,
    array $result,
    array $entry,
    array $form
);
Parameter Type Description
$result array The result envelope being assembled
$entry array The fully-processed GF entry
$form array The full GF form definition

Returns: array — the (possibly augmented) result.


When this fires vs. siblings

GF submission begins
        │
        ▼
mam_gf_processing_form (action)
        │
        ▼
Per-field validation
        │
        ▼
GF native submission (entry insert)
        │
        ▼
mam_for_gravity_forms_form_submitted_{form-id}     ← early hook (entry just inserted)
        │
        ▼
GF native post-processing (notifications, confirmations, conditional logic)
        │
        ▼
mam_gravity_forms_after_form_processed_{form-id}   ← THIS HOOK (entry fully processed)
        │
        ▼
mam_for_gravity_forms_form_result_form_{form-id} (envelope shaping)
        │
        ▼
do_action('mam_form_manager_send_notifications', $entry, $form, $result)
        │
        ▼
JSON response to app

Example: read computed field values

add_filter( 'mam_gravity_forms_after_form_processed_42',
    function ( array $result, array $entry, array $form ): array {

        // GF calculations have run — read the computed total.
        $total = (float) ( $entry['10'] ?? 0 );

        if ( $total > 1000 ) {
            // Fire a downstream side effect.
            $this->flag_high_value_submission( $entry, $total );
        }

        $result['data']['computed_total'] = $total;

        return $result;
    },
    10, 3
);

When to use

Use mam_gravity_forms_after_form_processed_{form-id} when you need to:

  • Read GF computed / conditional-logic field values (those run after the early ..._submitted_{id} hook)
  • Add data to the result envelope based on final entry state
  • Fire side effects after GF’s own notifications have run (so your side effect runs even if GF’s notification fails)

Use mam_for_gravity_forms_form_submitted_{form-id} when you need to:

  • Run before GF’s notifications
  • Mutate the entry while it’s still in early state
  • Persist additional metadata to the entry

Gotchas

  • Fires after GF’s own notification system runs. If you depend on GF notifications having been sent or failed, this is the right hook.
  • Conditional-logic field values are present here; they may not be in ..._submitted_{id}.
  • Form id is in the filter name. Don’t dispatch on form id inside a generic name.
  • Hot path for popular forms.
  • Don’t re-run notifications from here. Use mam_form_manager_send_notifications.

  • Form submission lifecycle
  • Forms manager overview
  • Hook: mam_for_gravity_forms_formsubmitted{id}
  • Hook: mam_for_gravity_forms_form_resultform{id}
  • Hook: mam_form_manager_send_notifications

Metadata

Field Value
Article type Hook Reference
Plugin slug mam-main
Applies to plugin version 2.1.11+
Hook type filter (dynamic — {form-id} is the GF form id)
Audience PHP developer
Last verified 2026-05-02
Contents

    Need Support?

    Can’t find the answer you’re looking for? Don’t worry we’re here to help!