How do you set multiple choice, text field or integer field set value back to null when a choice value is selected from a multiple choice

How do you set multiple choice, text field or integer field set value back to null when a choice value is selected from a multiple choice.

For example lets say I have a multiple choice radio selection list which has the choice options A and B.
So when A is selected it displays hidden fields lets say are text fields C and D.
Then when B is selected it displays hidden fields lets say are integer fields E and F and no longer displays text fields C and D as these are hidden when B is selected. And vice versa dependent on the choice selected either A or B.

Now my question comes in is how do you reset the values when lets say a user selects A and then enters text into C and D. The user realizes they have made the wrong selection and then clicks B. However if you change the selection back to A then you can still see the values previously typed in C and D. How do you reset those values for C and D when they are hidden?

If anyone could assist me with this I would greatly appreciate it!

1 Like

Hi Calvin,

Are you testing this out on a phone/tablet or on the web? I don't think there's a way to clear it like you describe, but if your concern is the submitted data, I believe the behavior should be correct. That is, if the form is submitted with B selected, then values C and D shouldn't appear in the form submission. Is that what you see too?

-Ethan

Hi Ethan, thank you for your response to this. My concern was the submitted data. Sorry I didnt think to test it in that way and you are correct. It doesnt submit the data, which is perfect.

Thank you for your time!
Have a great day further.