Description
The gravityflow_pre_restart_workflow action fires just before the workflow restarts for an entry.
Parameters
Examples
Modify a field value before restarting the entry
1 2 3 4 5 6 | add_action( 'gravityflow_pre_restart_workflow', 'sh_gravityflow_pre_restart_workflow', 10, 2); function sh_gravityflow_pre_restart_workflow($entry, $form) { if ( $form['id'] == '42' ) { GFAPI::update_entry_field( $entry['id'], '5', 'Apple' ); } } |
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?