I have multiple GravityForm forms (something like 15) on a site I’m now managing.
I want to add to all forms a collection of hidden fields (about a dozen, if not more) with metadata to be sent via post (using the Webhook Add-on) to a 3rd-party system.
Most of these hidden fields - if not all of them, will end being populated dynamically, through the query-string.
So, for example, if a person comes to the site with this URL: https://mysite.com/?lead_src=abc, and I have lead_src mapped to a field in the form, it will properly populate and be sent as “abc” to the 3rd-party system.
If I were to create these fields manually, form by form, I would have to create about 300 fields (12 x 15). And if my set of fields were to change in the future, I would have to edit each form to include the new ones.
With that in mind, is there a better, more streamlined way to add (and maintain) them? Maybe programmatically? I’m guessing a filter, that would add multiple hidden fields to any GravityForm forms (even if more than one form in the same page). Again, the set of hidden fields will be the same for all forms so, if the set of fields change in the future, they would change for all forms.