Description
The gravityflowformconnector_post_new_entry action allows customization to occur immediately after the new entry has been created by the form connector extension.
Parameters
Parameter | Type | Definition |
---|---|---|
$entry_id | Integer | The newly created entry ID. |
$entry | Entry | The entry for which the step was processed. |
$form | Form | The form for which the entry was submitted. |
$step | Step | The current step |
Examples
Add custom meta to new entry
1 2 3 4 5 6 7 | add_action( 'gravityflowformconnector_post_new_entry' , 'jo_fc_post_new_entry' , 10, 4 ); function jo_fc_post_new_entry( $new_entry_id , $entry , $form , $step ) { if ( $step ->get_id() == '95' ) { //Add custom meta value to the newly created entry gform_add_meta( $new_entry_id , 'my_test_key' , 'This is test data.' , $form [ 'id' ] ); } } |
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?