Expand my Community achievements bar.

Auto Select Radio Button

Avatar

Former Community Member
Hello,



I have a 40+ page form and I am trying to set up a page at the end that shows what the user has filled in for certain pages. I have all of this working except radio buttons. If on page 1, they select option A, on my results page, I want a option A selected again. I have tried using the following code as well as a few variations of it:

if (Main.Page39.GenSub[0].checked==true){

Main.Page41.Gensub[0].checked=true;



This doesn't work and I am running out of ideas.



Any help would be greatly appreciated.

Thanks in advance
7 Replies

Avatar

Former Community Member
You can set the on/off values of the radio buttons in the Binding tab. By default it is set to 1/0.

Avatar

Former Community Member
Thanks but its not a default. One example, i have a question that they answer either always, sometimes, or never. So if they select Always for this question, on the last page, when i reprint that question with the 3 radio buttons next, I need it to know what they picked on the earlier page, and select it there. So if they pick always on page XX, on the last page, Always will be selected

Avatar

Former Community Member
Not sure i follow ....I will need to see it. Can you send it to livecycle8@gmail.com

Avatar

Former Community Member
Can't send it, its a legal document but I can maybe maybe a new form real fast and show you. Ill try explaining it again.



Say there are 2 questions on a page and whenever you select an answer for number 1, number 2 automatically selects the same answer. That is what I need to happen, only difference is that it is several pages apart, but its the same idea. Whatever you select for the first one, the next one will select the same answer

Avatar

Former Community Member
Hi,

What you can do is to create the same radio buttons on the last page, and initially set them to both checked (under value and default = 1)and then set it to hidden. Then, if the user selects Option A on the first page, you set Option A on the last page to visible.

Avatar

Former Community Member
You have two options.

1. Set the names of each of the fields to the same name then set the binding as global.

2. On the exit event of the 1st question explicitly set the answer to the 2nd question. Note that you will have to path completely to that object as it will be out of context to the e1st object. So looking at the hierarchy you would say something like this:



form1.pagename2.Fieldname2.rawValue = fieldname1.rawValue



Note that if these are radiobuttons then you woudl be dealing with the exclusion groupname (typically RadioButtonList). This ensures that the radiobutton group can only have one answer. Also each individual radiobutton in th etwo groups must have the same on/off values.