gform_get_input_value_<field_formid>

The Gravity Forms gform get input value field formid hook.

Description

apply_filters( 'gform_get_input_value_<field_formid>', (unknown) $val, $lead, $field, $input_id ); 

Parameters (4)

0. $val (unknown)
The val.
1. $lead
The lead.
2. $field
The field.
3. $input_id
The input id.

Usage

To run the hook, copy the example below.
  1. $val = apply_filters( 'gform_get_input_value_{$field_formid}', $val, $lead, $field, $input_id ); 
  2.  
  3. if ( !empty( $val ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the gform_get_input_value_<field_formid> callback 
  2. function filter_gform_get_input_value_field_formid( $val, $lead, $field, $input_id ) { 
  3. // make filter magic happen here... 
  4. return $val
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "gform_get_input_value_{$field_formid}", 'filter_gform_get_input_value_field_formid', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "gform_get_input_value_{$field_formid}", 'filter_gform_get_input_value_field_formid', 10, 4 ); 

Defined (1)

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

/forms_model.php  
  1. $val = gf_apply_filters( array( 'gform_get_input_value', $field->formId, $field->id, $input_id ), $val, $lead, $field, $input_id );