Hi @ankit thanks for stopping by! If you want to update the hidden fields, you’ll want to use this call here. It’s important to note that it will update the entire form, as we don’t have a way yet to add just one field (or fields) without updating the entire form. You can see the PATCH option here. Hope that helps a bit!
Hi @Liz, I tried with the PATCH option but it is not working. It is saying “NOT_ALLOWED_VALUE”.
So means, every time we are creating a form, we need to pass the hidden field manually.
Hi @ankit the PATCH option won’t work for just adding hidden fields if you don’t include the entire form definition. This means that you’ll need to re-add each question in addition to adding the hidden fields. If that doesn’t work, would you mind sharing the call you’re making?
Hey @ankit
Are you creating forms via the APIs too? or manually in the builder?
If you do it via API, you can also specify hidden fields at the moment of creation under the hidden property.
"hidden": "
"user_id",
"email",
"another_hidden_field"
]
And via the builder, if your forms are similar, hidden fields should be copied when you duplicate a form.
If you want to change the value of a hidden field, so need to make an API call. Just change it’s value in the url
examples:
https://form.typeform.com/to/form1234#email=nico@lol.com
https://form.typeform.com/to/form1234#email=pedro@jojo.com
Hidden fields work as a “catch all”, we will grab the value passed in the url and store it with the answers submitted in the form.
Hi Picsoung,
We are creating the forms manually in the builder. We want to add new hidden fields via API, not to update the value.
Bumping this post, as adding hidden fields via the PATCH method is something I/my team would love to see support for as well.
In fact, due to the automation tool we’re using and the fact that our users create forms via UI, it is the only way we can add our hidden fields to users’ typeforms
Any chance this will ever be addressed?
Hi @nelav
Thank you for your feedback.
We haven’t planned to extend the possibility of the PATCH endpoint.
Which automation tool are you using at the moment?
You will need to first get the form
GET https://api.typeform.com/forms/form1234
Extract the JSON, change the properties as needed
And then upload the modified JSON using
PUT https://form.typeform.com/to/form1234
Hope this makes sense
Thanks, I do understand it. Our team is using Make/Integromat, unfortunately it doesn’t support grabbing the full JSON body, only mapping specific properties. With an unknown # of form fields and nested values, this approach won’t work with the “grab everything and PUT” method, only with the targetted PATCH approach, unless I’m missing something.
Bumping this as well. We have some users coming to our system who have existing typeforms that use features not supported to update or apply in the API. So reposting the entire form is not possible.
When we create a base form for them from our system it embeds some hidden fields for them to use from our system to use in their questions when launching the form from within our system including key association fields that allow the form to be easily tracked to a specific project etc.
Thus we have to tell them to manually add the hidden fields to their form through its settings making the work on their part harder than it needs to be, and potentially error prone.
Thanks for your help!
Hi ​@dergoog
Would you mind providing more details?
Feel free to reach out directly to our support team, if you don’t want to disclose too much here.
If you are dealing with customers’ forms, they should authorize your app to access their typeform account via OAuth consent flow. You can read more about it in our developer documentation.
Once authorized, you will get an access token to manipulate their forms via the API.
No need for manual work.
Let us know if you have trouble integrating,