Gravity Wiz

Magically enhanced tutorials, snippets and plugins for Gravity Forms!

  • Gravity Perks
    • Gravity Perks
    • Tutorials & Snippets
    • About
  • Support
    • Documentation
    • Support
    • Account

gpep_target_field_value

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

Description

Filter the value of a target field’s value.

Usage

Apply to all target fields on forms using GP Easy Passthrough.

add_filter( 'gpep_target_field_value', 'my_custom_function' );

Apply to all target fields on a specific form using GP Easy Passthrough.

add_filter( 'gpep_target_field_value_FORMID', 'my_custom_function' );

Apply to a specific target field on a specific form populated by GP Easy Passthrough.

add_filter( 'gpep_target_field_value_FORMID_FIELDID', 'my_custom_function' );

Parameters

  • $field_value string

    The field value to be displayed in the target field.

  • $form_id string

    Form ID of the current form that the target field belongs to.

  • $target_field_id string

    Field ID that field value is being filtered for.

Examples

Remove price at the end of a specific target field’s value.

This example will change Product Name ($5.00) to Product Name for field 2 on form 19.

add_filter('gpep_target_field_value_19_2', function( $field_value ) {
    return preg_replace( '/\s?\(.*?\)$/', '', $field_value);
});

Since

This filter is available since GP Easy Passthrough 1.4.10.

All Perks

  • GF Auto Login
  • GF Better User Activation
  • GF Blacklist
  • GF Conditional Logic Dates
  • GF Conditional Pricing
  • GF Copy Cat
  • GF Date Time Calculator
  • GF Disable Entry Creation
  • GF Easy Passthrough
  • GF eCommerce Fields
  • GF Email Users
  • GF Expand Textareas
  • GF File Upload Pro
  • GF Limit Checkboxes
  • GF Limit Choices
  • GF Limit Dates
  • GF Limit Submissions
  • GF Live Preview
  • GF Media Library
  • GF Multi-Page Navigation
  • GF Nested Forms
  • GF Pay Per Word
  • GF PayPal One-time Fee
  • GF Placeholder
  • GF Populate Anything
  • GF Post Content Merge Tags
  • GF Preview Submission
  • GF Price Range
  • GF Read Only
  • GF Reload Form
  • GF Terms Of Service
  • GF Unique ID
  • GF Word Count

Copyright © 2021 · Powered by WordPress · Gravity Wiz LLC

  • Support
  • Affiliates
  • About
  • Sitemap
  • Gravity Perks
    ▼
    • Gravity Perks
    • Tutorials & Snippets
    • About
  • Support
    ▼
    • Documentation
    • Support
    • Account