gpep_target_field_value
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.
1
2
3
4
5
6
7
8
9
<?php
/**
* Gravity Perks // Easy Passthrough // Remove Price at the End of a Specific Target Field’s Value
* https://gravitywiz.com/documentation/gravity-forms-easy-passthrough/
*/
// Update '123' to the Tartget Form ID and '4' to the Target field ID.
add_filter( 'gpep_target_field_value_123_4', function( $field_value ) {
return preg_replace( '/\s?\(.*?\)$/', '', $field_value );
} );
Since
This filter is available since GP Easy Passthrough 1.4.10.
All Connections
All Perks
- GF Address Autocomplete
- GF Advanced Calculations
- GF Advanced Phone Field
- GF Advanced Save & Continue
- GF Advanced Select
- GF Auto List Field
- GF Auto Login
- GF Better User Activation
- GF Blocklist
- GF Bookings
- 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 Email Validator
- GF Entry Blocks
- GF Expand Textareas
- GF File Renamer
- GF File Upload Pro
- GF Inventory
- GF Limit Checkboxes
- GF Limit Dates
- GF Limit Submissions
- GF Live Preview
- GF Media Library
- GF Multi-Page Navigation
- GF Nested Forms
- GF Notification Scheduler
- GF Page Transitions
- GF Pay Per Word
- GF Populate Anything
- GF Post Content Merge Tags
- GF Preview Submission
- GF Price Range
- GF QR Code
- GF Randomizer
- GF Read Only
- GF Reload Form
- GF Submit to Access
- GF Terms Of Service
- GF Unique ID
- GF Word Count