Hey y’all,
I’m using Typeform as a method for our users to update their personal information. Using hidden fields, I am able to display their current (old) information, then users can branch to questions where they can input (new) information, if it has changed. E.g.:
Q1: “Is still your mobile number: {hidden_field_mobile}?”
A1: “No.”
Q2: “Please enter your current mobile number.”
A2: [a short text input]
In essence, I want to create an old-new relationship between values stored in hidden fields and answers to questions related to the hidden fields.
We have an endpoint that parses the request sent by the webhook; there, using an association between answers and hidden fields, I would like to see the difference between the old and new inputs so we can display it to administrators of the system.
Here are my attempts at creating these associations:
- My initial idea was to set variables, with the same names as the hidden field, and assign to them the answer of select questions (within the Typeform), but I haven’t found a way to do that. This would allow me to compare the values with identical keys across the “hidden” (old values) and “variables” (new values) objects in the webhook request.
- Alternatively, I thought of setting a variable (using the same naming scheme as above) to the question identifier when it is answered, then, through more parsing of the webhook request, I could create an association between the hidden field (old) value and the answer to a question (new) via this variable.
- The one solution I have that works (technically, albeit it is absolutely disgusting) is to set a variable (again, named like above) to a static string that’s the same as the question name, to use as a pseudo-identifier (within the scope of the form). However, this makes the form much more difficult to maintain, and is a much weaker association.
Is there a precise way to associate hidden fields with answers?
Let me know if anything is unclear! Cheers 🍻
Isaac
Related information:
The guide found here (https://www.typeform.com/help/a/add-scores-and-calculations-to-your-typeforms-360054424131/) says you can add to or divide by the answer of a question, but I wasn’t able to in the Typeform I spun up. Is this a premium feature?
I found this forum post (https://community.typeform.com/build-your-typeform-7/how-to-assign-question-answer-to-a-variable-5653) but it’s interested in concatenating answers, and provides tools that can perform the concatenation.
There’s also this fourm post (https://community.typeform.com/typeform-developers-44/storing-arbitrary-meta-form-information-3933) about storing arbitrary meta-information, which is not possible.