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_submission and merge tags

  1. I'm stuck and I can't seem to find an answer anywhere. I'm trying to change $form['confirmation']['pageId'] depending on the value of the {embed_url} merge tag which I have stored in a hidden field.

    The problem is that the value of the hidden field is literally {embed_url}. How do I see the actual page the form was submitted from?

    Posted 12 years ago on Monday September 24, 2012 | Permalink
  2. How about using the gform_confirmation filter? It has access to both the form and the lead, and the $lead['source_url'] will be the embed URL. Then your function to set the confirmation redirect dynamically can be hooked to that filter and read that value and redirect appropriately.

    I don't think the {embed_url} is set when gform_pre_submission runs. I know it's available in the drop down of merge tags, but I don't think that is set until after submission, which is why you are seeing the literal value {embed_url} there.

    Posted 12 years ago on Monday September 24, 2012 | Permalink
  3. Thanks for your help, Chris. I'll give it a try.

    Posted 12 years ago on Monday September 24, 2012 | Permalink