Retaining radio selections when navigating forward or backward

technical-troubleshooting

#1

I am trying to create a sample test with 3 questions and each question has 4 radio buttons that the user can select. What I want is to select a radio button on question 1, navigate to question 2, but then if I go back to question 1 be able to see what radio button I had previously selected. None of the Global or OnLoad pages I have read discuss this problem. Is this possible and how do I accomplish this task?


#2

Hi ! you can easily manage this interaction with the “Dynamic Panels” Widget I left you an example, launch it and you will understand how it works.

Good luck to you
Radio-selection.rp (59.2 KB)


#3

Thank you. I’ll take a look and see if that meets my needs.


#4

So that definitely does the trick, but I am so far into my prototype that to change to a dynamic panel would cause me to have to rework so many other elements that are also working dynamically at this point. I will use this in the future though from the very beginning. Thanks.


#5

Hey @mgreen! You have every question on a different page, is that right? Then, the other way would be to assign a global variable that memorizes the selected state of your radio button whenever it’s selected, and then on the Page Loaded event add a condition that checks if the value of this variable is “true”, then you set the selected state of the radio button to “true” as well. If you tell us more about your current setup or attach a sample file, we might take a closer look at it.


#6

Yes, every question is on a different page. I was trying the global variable on page load, but I was doing it totally wrong and couldn’t get it figured out. I can’t attach the prototype without it revealing too much proprietary info. How would you do that and do you have a sample? If not, no worries. I just couldn’t figure it out properly and gave up, but likely I was doing something wrong.


#7

I was thinking about a setup that might look like the one you can find in the attached file, but there might be a more interesting solution, so I will think about it. Keepingrbselection.rp (73.9 KB)


#8

This looks like it will definitely work for what I have been doing. I am going to apply it to my prototype today and give it a whirl. I’ll respond back if I get it working like your prototype, but looking at yours I now think I know where I was going wrong with the OnLoad. I believe I was putting the OnLoad on a button versus on the page. Thank you!


#9

It totally works and I’ve got it all incorporated now and working beautifully. Thank you again for posting that file as it really helped me a ton to see where I was going wrong in my previous attempts.


#10

I am delighted to hear I was able to help–thanks for letting me know! Happy prototyping!


closed #11

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.