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.

Hooks and filters - feature request

  1. Hi-

    I am using gform_pre_submission in my functions.php. By default, there does not seem to be any support for a form-specific gform_pre_submission. That is, if you use it without any other checking code, it will apply to all of the forms in your blog.

    I'd like to request:

    gform_pre_submission_$form_id

    (like gform_pre_render allows gform_pre_render_$form_id)

    Thanks!

    Posted 14 years ago on Thursday July 15, 2010 | Permalink
  2. I am in the process of updating all hooks making sure there is a generic and a form specific "hookname_$form_id" way of calling them. So look for that in our next release.
    Meanwhile you can add an if statement to the pre_submission hook so that it only applies to your form. Something like the following:

    if($form["id"] != 5)
       return;
    Posted 14 years ago on Thursday July 15, 2010 | Permalink

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