Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Radio Buttons and text box

Avatar

Level 2

Hi,

LiveCycle 8.2.1.4029.1.523496

I have a mandatory radio button group that I would like to bind a text field (called other) to.

If the radio buttons do not have an appropriate choice the user can enter the details into the "other" field.

However they can only make one choice. That is click a radio button or enter details into the "other" field.

I do not want to (I will take advise on this)  have an "other" radio button that displays a text box when selected. We have remote sites who have limited internet access and they need a hardcopy form to email/snail mail.

any ideas??

Thanks

WowRonin

8 Replies

Avatar

Former Community Member

I created a simple sample for you .....the code to hide the Other field is on the change event of the RadioButtonList Object. Now you can bind the RadioButtonList to the appropriate value and the Other field to the appropriate value as well.

Hope that helps

Paul

Avatar

Level 2

Hi Paul,

Thanks. Its what I'm looking for.

I've figured out how to create and hide (Hidden -exclude from layout) the text field from your sample but I haven't been able to bind it to the required radio button.

I've looked at the object/field/value/binding options and they match your sample.

I noticed that Other_Details click option has the following code xfa.host.resetData();

What have I missed??

thanks

WowRonin

Avatar

Former Community Member

In most cases the radiobuttonlist is bound to one node and the Other field is bound to a separate node. The RadioButtonList generally is bound to known values ....Yes, No, Other .....the Other field will have any value the user wants to add ...that is why it is bound to a separate node.

Hope that helps

Paul

Avatar

Level 2

Hi Paul,

I understand what you are saying but the problem is I have no idea about how to go about doing it.

Can you explainthe process to bind the radio button list and the Other field it point me to some reading on it.

I'm a Livecycle beginner so any help would be appreciated.

thanks

WowRonin

Avatar

Former Community Member

If you make sure that the binding on each of the fields is set to Use Name ..... then export your data from the form it will create an XML structure for you and you can see what I am refering to.

Paul

Avatar

Level 2

Hi Paul,

With the greatest of respect I have no idea what you are talking about.

Where do I go to set the field binding to Use Name

What I need is a explanation in laymans terms of how you go about binding a hidden field to a radio button.

I need the specific steps of the process, not a high level overview of the process.

I appreciate that you are vounteering your services to the forum however I think you may have forgotten that the vast majority of us are just starting out in this space and we need "how to" explantions of the process or a reccomendation on where we might find the information we are asking about. It may seem simple to you but right now it sure looks complicated and confusing to me.

WowRonin

Avatar

Former Community Member

On each object on your form (that requires user interaction) you can open the Object/Binding palette. On that palette there is a Data Binding field. To the right of that field is an icon that will expand the list and allow you to choose a type of binding (see the image below). Choose the "Use Name (Name of Object): option. This binds the field to the output data file and wil create an entry for it. Make sure all of your objects are setup this way. Now when you create a data file it will include these objects in that file. See the image below:

screen1.png

To create a sample data file you can go into File/Form Properties/Preview and on that panel there is a Generate Preview Data button. Create a sample data file and save it to your desktop. Now open that xml file in a text editor and you will see the structure that I referred to earlier.

Does that help?

Paul

Avatar

Level 2

Thanks Paul,

Sometimes the trees get lost in forest.

I found the chunk of java in the xml

Worked out what goes where

All is good.

WowRonin