Skip to content

Commit 76a5e0f

Browse files
committed
gf-openai-post-save-result-to-field.php: Added snippet to populate fields with Open AI generated values.
1 parent aa6b37f commit 76a5e0f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

gravityforms-openai/gf-openai-post-save-result-to-field.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
*
1313
* Instructions: https://gravitywiz.com/documentation/how-do-i-install-a-snippet/
1414
*/
15-
// Replace 342 with the form id, and 3 with the targetted field id.
16-
add_action( 'gf_openai_post_save_result_to_field_342', 'gw_openai_post_save_result' );
17-
function gw_openai_post_save_result( $result ) {
15+
// Replace 1 with the form id, and 3 with the targetted field id.
16+
add_action( 'gf_openai_post_save_result_to_field_1', function ( $result ) {
1817
$_POST['input_3'] = $result;
19-
}
18+
} );

0 commit comments

Comments
 (0)