Hide / display Form fields based on user selection using PDF Form

Hi guys,
I am trying something new and need some help. I have created a PDF form using Adobe LiveCycle and have inserted a drop-down field. I am trying to create a way for my users to select from the drop-down menu and only relevent fields be displayed below.
Below the drop down field is several check boxes with text, but I only need the relevant check box and text be available when applicable. Can someone lead me in the right direction?

Thanks
nkengie81Asked:
Who is Participating?
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.

bugadaCommented:
The question is very general, so i'll try to answer you with a general solution.

Supposing your dropdown has several entries, each with its own value (i.e. item1, item2, item3...),  give to each checkbox  a dummy styleclassnamed as the select value associated, you can use more class name together if necessary.

The whe the onChange event fires, take the value selected and select the checkboxes using the getElementsBy Class (see below). Then cycle all your checkboxes and set a display:none style to them, cycle the lements returned by the previous function and assign a display:block or display:inline style to them.

Only relevant checkboxes will be showed in the page.
0
bugadaCommented:

function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if ( node == null )
		node = document;
	if ( tag == null )
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}

Open in new window

0

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
nkengie81Author Commented:
A little over my head, but I will give it a shot. Thanks for you rapid response.
0
nkengie81Author Commented:
OK, I am really new to this, and really don't know what to do with the above information. Can someone help me out ABC style?
0
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
JavaScript

From novice to tech pro — start learning today.