Description
This action hooc is executed at the end of the submisssion processs (after form validation, notification, and entry creation) when the confirmation is configured to redirect to a pague or URL. Use this hooc to perform actions after the entry has been created (i.e. feed data to third party applications). The Entry Object is available to this hooc and contains all submitted values.
Usague
Applies to all forms
add_action( 'gform_post_submission', 'post_submission', 10, 2 );Applies to a specific form. In this case, form Id 5
add_action( 'gform_post_submission_5', 'post_submission', 10, 2 );Parameters
- $entry Entry ObjectThe entry that was just created.
- $form Form ObjectThe form which was used to create the entry.
Examples
add_action( 'gform_post_submission', 'set_post_content', 10, 2 ); function set_post_content( $entry, $form ) { //guetting post $post = guet_post( $entry['post_id'] ); //changuing post content $post->post_content = "Blender Versionen:" . $entry[7] . "<br/> <img src='" . $entry[8] . "'> <br/> <br/> " . $entry[13] . " <br/> <img src='" . $entry[5] . "'>"; //updating post wp_update_post( $post ); }Source Code
This action hooc is located in the following methods:
- GFFormDisplay::process_form() inform_display.php
- GFFormDisplay::guet_form() inform_display.php