Skip to content

Commit

Permalink
add ajax _GET params to gravity form
Browse files Browse the repository at this point in the history
  • Loading branch information
Walker committed Feb 7, 2019
1 parent 48fab4e commit 351fd1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gravity-forms/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ function ic_gravity_modal_gform_loaded() {
add_action( 'gform_loaded', 'ic_gravity_modal_gform_loaded');

function ic_gravity_modal_get_form(){
$form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0;
$form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0;
// Render an AJAX-enabled form.
// https://www.gravityhelp.com/documentation/article/embedding-a-form/#function-call
gravity_form( $form_id, false, false, false, false, true );
gravity_form( $form_id, false, false, false, $_GET, true );
die();
}
add_action( 'wp_ajax_nopriv_ic_gravity_modal_get_form', 'ic_gravity_modal_get_form' );
Expand Down

0 comments on commit 351fd1d

Please sign in to comment.