I have been investigating the possibility of scripting a series of modifications to ALL forms on the instance. Once possible scenario is a field that needs to be added to all forms (GDPR, GCLID, ...)
This method let's you "upload a config file" to a form field:
In the GCLID scenario though, it's not enough to just set the field type to hidden, you also need to set where to get the value from and the parameter name.
However, it seems these two settings are not possible via REST API?
Has anybody managed this or found a workaround?
Thanks in advance!
I just confirmed this is possible via Postman using the following fields (undocumented from what I can tell):
You can fight and fight to reverse-engineer the right payloads here, and for very little payoff.
I recommend instead you inject a Rich Text Area, have that RTA load a single external JS file, and have that JS file manage all your form behaviors via the standard Forms JS API.