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 hook firing even if form is not found

  1. Hi,

    When using the [gravityform] shortcode to embed a form in a post, and use a non existant id (perhaps the form was deleted after the post was created), then the gform_pre_render hook is fired with a null $form as an argument.

    If this hook is employed by any plugins such as the WMPL Gravity forms multilingual or in our case a custom plugin then we have to check for a valid $form object before using it otherwise we get some nice exceptions thrown by php.

    I dont know if this is by design, so I am reporting it as a probable bug -perhaps the hook should not be fired at all if the form is not found.

    This occurs in the latest version of Gravity Forms. 1.6.11
    Cheerz,
    Ioannis Kappas

    Posted 11 years ago on Thursday December 20, 2012 | Permalink
  2. Thank you for this report. I will bring it to the attention of the development team.

    Posted 11 years ago on Thursday December 20, 2012 | Permalink
  3. David Peralty

    Okay, so our developers have confirmed this behavior and will be discussing what if anything should be done about it. It won't be in the main 1.7 release as they want to get that out soon, but it will be looked at closely for the next version. All my best!

    Posted 11 years ago on Thursday December 20, 2012 | Permalink

This topic has been resolved and has been closed to new replies.