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.

Multiple field values not populated

  1. I'm using the shortcode method to dynamically populate two forms. Only the first field will populate, the second field (building address) will not pass the value. Any thoughts? I've triple checked everything and settings are correct (merge field & syntax).

    Using:
    [gravityform id=1 name=BuildingInventory Update Request title=false description=false ajax=true field_values='BuildingName=Test Building Name&BuildingAddress=123 Main St NW']

    Only 'BuildingName' is being passed.

    Posted 12 years ago on Sunday July 31, 2011 | Permalink
  2. Change the ampersand in between the "Test Building Name" and "BuildingAddress" to

    &

    and I think it will work for you. It worked for me here:
    http://gravity.chrishajer.com/request-an-update/

    Without changing that & to & this was what the hidden field looked like in the source of the page with the form:

    <input type='hidden' name='gform_field_values' value='p1=Test+Building+Name&%23038%3Bp2=123+Main+St+NW' />

    It was being changed to &%23038%3B.

    Please try it as &amp; in your shortcode and see if that works. I will investigate why that's required as the documentation does not explain it that way.

    p.s. That's the only change you need to make in your shortcode. I changed the parameter names while testing to see if capitals were a problem, or if Name was reserved. And Gravity Forms converted the spaces to + as you see in the hidden field.

    Posted 12 years ago on Sunday July 31, 2011 | Permalink
  3. In my test it seems to work, unless your input starts with 'B', as you mentioned above. The html for & is converted to '%23038%3B'. Having a field name with 'B' following the trailing 'B' seems to be what's setting it off. At least on my end. Change the field name from 'Building Name' to 'Name' works. Try 'BName' doesn't work.

    Posted 12 years ago on Sunday July 31, 2011 | Permalink
  4. I just tried another test. Here's my shortcode:

    [gravityform id=10 name=BuildingInventory Update Request title=false description=false ajax=true field_values='Bp1=Test Building Name&amp;Bp2=123 Main St NW']

    Both parameters begin with a B and it still seems to work for me. I can have the lead developer take a look at why the problem exists. As a work around, do you have the opportunity to change the parameter names to something that will always work?

    Posted 12 years ago on Sunday July 31, 2011 | Permalink
  5. brian.s
    Member

    Thank you for the &amp; clarification (as opposed to &). Please make this revision to the Shortcode section of the Dynamic Field Population in your official documentation, as it states the contrary.

    Posted 12 years ago on Wednesday November 9, 2011 | Permalink
  6. Good point Brian. I'll bring it to the attention of the documentation team.

    Posted 12 years ago on Wednesday November 9, 2011 | Permalink
  7. Thanks for the heads up guys. The documentation has been updated accordingly.

    Posted 12 years ago on Thursday November 10, 2011 | Permalink

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