These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Autopopulating with a combobox

MagpieManny
Registered: Oct 26 2008
Posts: 18
Answered

Hey, I am kinda new here so forgive me for any questions that are already answered,

I am currently making a form for something and I stumbled on the following problem:

I have a combobox with several options.

What I want is that the field next to it autopopulates with text depending on the choice made in the combobox. How do I do this?

Thanks,

MM

My Product Information:
Acrobat Pro 8.0, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
To clarify, are you using Acrobat or LiveCycle Designer ot create your form?

If you can give an example of the list of combo box items and the corresponding text field values, we can probably suggest specific code you can use.

Does the text field need to be to be modifiable by the user after it case been autopopulated?

George
MagpieManny
Registered: Oct 26 2008
Posts: 18
Hey there George,

I am using Acrobat.

Well the combobox just gives the options of a few lines of text. The other fields have texts to. So nothing really fancy.

So for example I choose something out of the drop box, say choice A. The field which needed to autopopulate should show text corrosponding with choice A.

Hope that's clear...
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
Have a look at [url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/change_another_field/]Changing Another Field with Combo Box (Drop Down) Selection[/url] by Thom Parker. It uses a data object to hold all the data. To have a space in the slection item you will need to use quotation marks in the DataObject.

George Kaiser

MagpieManny
Registered: Oct 26 2008
Posts: 18
Works perfectly! Bit of typing but it works fine.

Now I have another question.

I have for example five checkbox options like:

OOOOO

And I want a field to ad the amount of checked options together.

So if I checked the first 4 the field says 4... 3 , 3 etc...

I believe this is a different topic. So I'll post one..

Thanks