Convert Check boxes on LiveCycle Form to Radio Buttons

I have an existing form that has three checkboxes on it for user input.  I need to change them to be radio buttons so only one can be selected at a time.
yoducatiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Karl Heinz KremerCommented:
Let's see if we can resolve this. Here are the steps you need to perform:

We start out with a document that has three checkboxes:

Three checkboxes
You can change the checkboxes to radio buttons in different ways. Here is one way:

Change field type
You just click on the "Check Box" setting and change it to "Radio Button".

This gives us this view:

Three radio button groups
As you can see, we have three radio button groups, with one radio button in each group. With drag and drop, we can now bring all three of these buttons into one group (I add the 2nd and 3rd button to the first group):

Drag
Now just rename the radio button group and the individual radio buttons to something a bit more meaningful:

Rename
Now you need to switch to the Object window and the "Binding" tab:

Change export values
As you can see, the different radio buttons have different names, but they all export the same value 1 (that's because that is the default export value for a selected checkbox. Change these to 1, 2 and 3.

If you are using the radio button setting in your code, you will need to use something like this:

if (RadioButtonGroup1.rawValue == 1) {
    // do something
}
else if (RadioButtonGroup1.rawValue == 2) {
   // do something
}
else if (RadioButtonGroup1.rawValue == 3) {
   // do something
}

Open in new window


You can of course also use a switch statement to handle the radio button value.

This should do the trick.
2015-03-10-16-37-33.png

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
yoducatiAuthor Commented:
Im back to having the same problem as before.  The radio buttons work now as far as the look and selection are concerned.  They are grouped as you outlined above.  But when I test the form none of the items that are calculated based upon the selection show up.
yoducatiAuthor Commented:
Scratch that.  Everything is working except for the date field.  It should automatically populate with the current date but nothing shows up.
Karl Heinz KremerCommented:
What code are you using for the date field?
yoducatiAuthor Commented:
I think I have that working too now.  I didn't change anything though so I'm not sure what caused the problem.  When I changed the item values I got a popup window that locked up my pc each time.  I'm not sure what caused that as the error message was just telling me that some items in the list had the same value which is what I was trying to change.  After I got those changed and closed out of everything and went back in it started working again including the date field.  Thanks for the help!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Acrobat

From novice to tech pro — start learning today.