gform_<slug>_field_value_<form_id>_<field_id>

The Gravity Forms gform slug field value form id hook.

Description

apply_filters( 'gform_<slug>_field_value_<form_id>_<field_id>', (unknown) $field_value, $form, $entry, $field_id ); 

Parameters (4)

0. $field_value (unknown)
The field value.
1. $form
The form.
2. $entry
The entry.
3. $field_id
The field id.

Usage

To run the hook, copy the example below.
  1. $field_value = apply_filters( 'gform_{$slug}_field_value_{$form_id}_{$field_id}', $field_value, $form, $entry, $field_id ); 
  2.  
  3. if ( !empty( $field_value ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the gform_<slug>_field_value_<form_id>_<field_id> callback 
  2. function filter_gform_slug_field_value_form_id_field_id( $field_value, $form, $entry, $field_id ) { 
  3. // make filter magic happen here... 
  4. return $field_value
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "gform_{$slug}_field_value_{$form_id}_{$field_id}", 'filter_gform_slug_field_value_form_id_field_id', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "gform_{$slug}_field_value_{$form_id}_{$field_id}", 'filter_gform_slug_field_value_form_id_field_id', 10, 4 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/addon/class-gf-addon.php  
  1. return gf_apply_filters( array(