1. Description
  2. Usage
  3. Parameters
  4. Examples
    1. Add Line Break Between Live Merge Tag Checkbox Values
  5. Since


Filter the live merge tag value.


Apply to all fields and forms.

add_filter( 'gppa_live_merge_tag_value', 'my_custom_function' );

Apply to all fields on a specific form.

add_filter( 'gppa_live_merge_tag_value_FORMID', 'my_custom_function' );

Apply to a specific field on a specific form.

add_filter( 'gppa_live_merge_tag_value_FORMID_FIELDID', 'my_custom_function' );


  • merge_tag_match_value string|int

    The value with which the live merge tag will be replaced.

  • merge_tag_match string

    The merge tag that is being replaced.

  • form array

    The current form object.

  • field_id int

    The field ID targeted by the current merge tag.

  • entry_values array

    An array of values that should be used to determine the value with which to replace the merge tag.


Add Line Break Between Live Merge Tag Checkbox Values

This snippet replaces the default comma that separates the selected choice values when replacing a Checkbox field’s merge tag with line breaks.

 * Gravity Perks // Populate Anything // Add Line Break Between Live Merge Tag Checkbox Values
 * Instruction Video:
// Update "123" with your form ID and "4" with your Checkbox field ID.
add_filter( 'gppa_live_merge_tag_value_123_4', function( $value, $merge_tag, $form, $field_id, $entry_values ) {
	$values = array_map( 'trim', explode( ',', $value ) );
	return implode( '<br>', $values );
}, 10, 5 );

Extract and return only the domain portion of an email address when replacing an Email field’s merge tag.

 * Gravity Perks // Populate Anything // Extract Domain from Email Address
// Update "123" to your form ID; and "4" to your Email field ID.
add_filter( 'gppa_live_merge_tag_value_123_4', function( $value ) {
	$bits = explode( '@', $value );
	return array_pop( $bits );
} );


This filter is available since Gravity Forms Populate Anything 1.0-beta-4.35.