In my survey, I have set up a hidden field called 'surveyflag'. There is a multi choice in the survey. My question is: Can I set a value for each of the two options, such as Option A = 1, Option B = 2, and then pass the value to the hidden field when the survey is submitted?
Pass option's value to hidden field
Hi
Are you sending the data from the hidden field out of the survey? Or are you trying to have the hidden field value captured with their response in the Typeform results?
It’s the second one, I'm not sure if Typeform can do this right now.
If you are passing the data from an external source (ie CRM/ESP) and you want to pass in, for example, the email of a subscriber, you would do that in the url with the name=value in the url. in the typeform, you would create a hidden variable called the same name as in your url string and it would act as the recipient of the data value.
on submit, both the answers to questions AND a hidden variable passed into the form are recorded
des
I forgot to mention that because I have set up a webhook, the API needs to receive the same field name’s result. That's why I set up a hidden field in the survey first and tried to populate the hidden field with the user's response when they submit the survey and send it to the API. I apologize for not explaining clearly earlier and causing confusion.
![](https://uploads-eu-west-1.insided.com/typeform-en/attachment/ed21b021-7bcc-4299-afe9-0ba878ab8d02.png)
- q1_text = DVD
it’s already available to the API
if you want to pass it as a variable, you simply need to create a custom variable NOT a hidden variable
![](https://uploads-eu-west-1.insided.com/typeform-en/attachment/0477dc42-095a-45dc-a4ba-64215164c8a9.png)
tthen you use the logic rules to replace the value of the variable you create with the output from the question choice
here’s an example:
![](https://uploads-eu-west-1.insided.com/typeform-en/attachment/0f2fcf91-42ec-4097-aeca-ae8e92fa2f97.png)
you can create the variable (i used v_example) and used the replace function to set the value of the variable with the hardcoded text line
you would have to do this with every option - ie create a logic rule
you don’t need to do this if you can pass the question_text/choice name pair from the submit function
des
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.