Description
The gravityflow_field_value_entry_editor filter determines if the current field is an editable Nested Form field so the required functionality can be included.
Parameters
Parameter | Type | Details |
---|---|---|
$value | String | The current field value. |
$field | Field | The current field. |
$form | Form | The current form. |
$entry | Entry | The current entry. |
$step | Step | The current step. |
Examples
Force application of default value with the New Entry Workflow step
1 2 3 4 5 6 7 | add_filter( 'gravityflow_field_value_entry_editor' , function ( $value , $field , $form , $entry , $step ) { $is_current_step_submission = ! empty ( $_POST ) && rgpost( 'gravityflow_submit' ) == $form [ 'id' ] && rgpost( 'step_id' ) == $step ->get_id(); if ( ! $is_current_step_submission ) { $value = $field ->get_value_default_if_empty( $value ); } return $value ; }, 10, 5 ); |
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?