PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

gform_pre_render & multi-page form

  1. carcinomad
    Member

    1. Is gform_pre_render called on each page of a multi-page ajax form?
    2. How can I determine which page was just submitted?

    Posted 13 years ago on Monday August 8, 2011 | Permalink
    1. Yes.
    2. If you check the $_POST variable there will be a property titled "gform_source_page_number_{form_id}". The form ID will be the ID of the form being submitted. Assuming you are getting the submitted page in the gform_pre_render filter, this line will do that:
      [php]
      $current_page = rgpost('gform_source_page_number_' . $form['id']) ? rgpost('gform_source_page_number_' . $form['id']) : 1;
    Posted 13 years ago on Monday August 8, 2011 | Permalink