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.

How to pass an URL with an Ampersand (&) in a dynamically populated field?

  1. walt


    Currently I'm working on a form with several fields that will be dynamically populated. One of these fields will receive URL's of the following form:

    There is an & in the URL that is currently being cut-off in the dynamically populated field, resulting in:

    Question: how can I prevent the & from being cut off in the dynamically populated URL field?


    Posted 9 years ago on Tuesday January 1, 2013 | Permalink
  2. I'm not sure if Gravity Forms can do anything about that. If your form is located on a page here:

    And you are sending your string to the form with a parameter like this:

    I believe WordPress is going to split that into at least two parameters:
    tree: ancestors

    I'm surprised that personID is not split off as well, since there are two question marks in that query string.

    I think this is all coming from WordPress though, and the web server software. Maybe you will need to plan on that "tree" parameter being sent always, and store that in another field, dynamically populated with the parameter name of "tree". If you need to put it all back together, you can do that in a hidden field and use the gform_pre_submission_filter.

    Or, maybe you can modify the string before it's sent to your form, to encode the ampersand, or otherwise make this appear as just one long string to your WordPress page.

    Posted 9 years ago on Wednesday January 2, 2013 | Permalink