gform_save_field_value_<form_id>

The Gravity Forms gform save field value form id hook.

Description

apply_filters( 'gform_save_field_value_<form_id>', (unknown) $value, $lead, $field, $form, $input_id ); 

Parameters (5)

0. $value (unknown)
The value.
1. $lead
The lead.
2. $field
The field.
3. $form
The form.
4. $input_id
The input id.

Usage

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

Defined (2)

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

/forms_model.php  
  1. return gf_apply_filters( array( 'gform_save_field_value', $form['id'], $field->id ), $value, $lead, $field, $form, $input_id ); 
  1. $value = gf_apply_filters( array( 'gform_save_field_value', $form['id'], $field->id ), $value, $lead, $field, $form, $input_id );