/** * Get the form ID of the form currently being displayed * * @since 1.17.1 * * @return int ID of the current form being displayed. `0` is returned if no forms are found. */ private function get_form_id() { $form_id = GFForms::get('id'); // If there are no forms identified, use the first form. That's how GF does it. if (empty($form_id) && class_exists('RGFormsModel')) { $form_id = $this->get_first_form_id(); } return absint($form_id); }