gform_get_input_value_<form_id>_<field_id>

The Gravity Forms gform get input value form id field hook.

Description

apply_filters( 'gform_get_input_value_<form_id>_<field_id>', $rgar, $lead, $field, $input_id ); 

Parameters (4)

0. $rgar
The rgar.
1. $lead
The lead.
2. $field
The field.
3. $input_id
The input id.

Usage

To run the hook, copy the example below.
  1. $rgar = apply_filters( 'gform_get_input_value_{$form_id}_{$field_id}', $rgar, $lead, $field, $input_id ); 
  2.  
  3. if ( !empty( $rgar ) ) { 
  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_<form_id>_<field_id> callback 
  2. function filter_gform_get_input_value_form_id_field_id( $rgar, $lead, $field, $input_id ) { 
  3. // make filter magic happen here... 
  4. return $rgar
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "gform_get_input_value_{$form_id}_{$field_id}", 'filter_gform_get_input_value_form_id_field_id', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "gform_get_input_value_{$form_id}_{$field_id}", 'filter_gform_get_input_value_form_id_field_id', 10, 4 ); 

Defined (2)

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

/forms_model.php  
  1. $lead[ (string) $input['id'] ] = gf_apply_filters( array( 'gform_get_input_value', $form['id'], $field->id, $input['id'] ), rgar( $lead, (string) $input['id'] ), $lead, $field, $input['id'] ); 
  1. $lead[ $field->id ] = gf_apply_filters( array( 'gform_get_input_value', $form['id'], $field->id ), $value, $lead, $field, '' );