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.

Dynamic Population with Field Names

  1. Does anyone know of a way or some additional code to use Dynamic Population not just on the field value, but also the field name as well?

    Posted 12 years ago on Friday September 14, 2012 | Permalink
  2. Can you describe in more detail what you're trying to do? You can use the gform_pre_render filter to change anything about the $form object (including the label), but I am having a hard time envisioning what you need to do.

    Posted 12 years ago on Friday September 14, 2012 | Permalink
  3. Basically I'm having price data come over from another form (a non-Gravity form) via query strings with product options, for example: Neoprene_Hose = 20.00.

    However, the next product might not have that option. It might have Silocon_Hose = 30.00.

    I've gotten around this by having hidden fields generically labeled "Option1" (with as many as 10), with a ForEach loop that renames the $_GET key to "Option1" and puts the original key$ in the value$ for reference. (with a counter moving up until the For Each is done.)

    This does work, as the email that gets sent out lists Option1, Option2, etc. But I was hoping to dynamically change those labels to the original key$ (Silocon Hose, Neoprene Hose).

    I guess what it really comes down to is the first form, the non-Gravity form, isn't always static. It's form checkboxes and radio buttons can change, and I was hoping I could have a single Gravity form work with this setup somehow.

    I'm guessing not, simply because then what would the field names say when you actually browse through the data in Gravity Forms?

    I hope that makes it more clear. I'm having trouble explaining it myself. :)

    Posted 12 years ago on Friday September 14, 2012 | Permalink
  4. I think you are correct, for exactly this reason:

    I'm guessing not, simply because then what would the field names say when you actually browse through the data in Gravity Forms?

    Posted 12 years ago on Friday September 14, 2012 | Permalink
  5. Worth a shot. :) Thanks very much.

    Posted 12 years ago on Friday September 14, 2012 | Permalink
  6. If I learn anything different, I will post it here. Thanks.

    Posted 12 years ago on Friday September 14, 2012 | Permalink