gform_entry_meta_pre_render_feed_settings

Description

Allows the JavaScript entry_meta variable to be populated on the feed configuration page.

Usage

Applies to all forms:

add_filter( 'gform_entry_meta_pre_render_feed_settings', 'your_function_name', 10, 3 );

Parameters

  • $entry_meta array
    An empty array or an array of entry meta fields to be assigned to the JavaScript entry_meta variable.
  • $form Form Object
    The form the feed is being created or edited for.
  • $addon Object
    The current add-on instance.

Examples

Configure a Webhook feed Conditional Logic

The following examples allow configuring Webhook feed conditional logic based on the entry Source URL property.

Add gform_entry_meta_pre_render_feed_settings filter settings.

add_filter( 'gform_entry_meta_pre_render_feed_settings', function ( $entry_meta, $form, $addon ) {
	if ( $addon->get_slug() === 'gravityformswebhooks' ) {
		$entry_meta['source_url'] = array(
			'label'  => 'Source URL,
			'filter' => array(
				'operators' => array( 'is', 'isnot', '>', '<', 'contains' ),
			),
		);
	}

	return $entry_meta;
}, 10, 3 );

Add gform_entry_meta_pre_evaluate_conditional_logic filter settings.

add_filter( 'gform_entry_meta_pre_evaluate_conditional_logic', function ( $entry_meta, $form ) {
	$entry_meta['source_url'] = array();

	return $entry_meta;
}, 10, 2 );

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?

Source Code

This filter is located in GFFeedAddOn::get_feed_settings_entry_meta() in /includes/addon/class-gf-feed-addon.php

Since

The filter was added in Gravity Forms 2.9