cancel
Showing results for 
Search instead for 
Did you mean: 

presence property works not correctly

Former Member
0 Kudos

Hello, experts.

I have faced next problem creating my interactive PDF form.

I want to make group of objects invisible when user selects "No" in Drop-down List. Here is my code for function change on that DDL:

-


form1.subform.DropDownList1::change - (JavaScript, client)
if (form1.subform.DropDownList1.rawValue == 0) { 
	xfa.form.form1.subform.Passport.DEContent.Pass_Num.presence = "visible";
	xfa.form.form1.subform.Passport.DETitle.DETitleText.presence = "visible";
	xfa.form.form1.subform.Passport.DETitle.fillColor = "220,227,236";
	xfa.form.form1.subform.Passport.DEContent.ReleaseDate.presence = "visible";
	xfa.form.form1.subform.Passport.DEContent.ReleasePlace.presence = "visible";
}
else{
	xfa.form.form1.subform.Passport.DETitle.DETitleText.presence = "invisible";
	xfa.form.form1.subform.Passport.DETitle.fillColor = "255,255,255";
	xfa.form.form1.subform.Passport.DEContent.Pass_Num.presence = "invisible";
	xfa.form.form1.subform.Passport.DEContent.ReleaseDate.presence = "invisible";
	xfa.form.form1.subform.Passport.DEContent.ReleasePlace.presence = "invisible";
}

-


In fact i am seeing next changes: color and TitleText in object DETitleText aren`t changing at all, other input fields become inactive for input any data but their captions are still visible, same as underline properties on them. How could i make all of these objects invisible for printing and for viewing.

Regards, Nikita Tokarev.

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Still never figured out why the caption doesn't disappear when an input box presence is sent to invisible. Any suggests are welcome.

Former Member
0 Kudos

Okay! I found out the problem with the WebDynpro submit buttons not completely disappearing.

When you add it to your form it has a custom appearance. Change the appearance back to Raised Border or Solid Border and it works fine.

I still need to figure out the input box and why the caption doesnt disappear.

Former Member
0 Kudos

We're currently using version 8.1 of Lifecycle Designer

Edited by: Ken Bracken on Jul 28, 2009 2:43 PM

Former Member
0 Kudos

Did anyone ever find a solution to this?

When I set the presence to invisible on a button only the caption disapears. The button is still visible on the form.

And for an input field the caption and outline of the input field is still visible.

Got any ideas?

ChrisSolomon
Active Contributor
0 Kudos

I think I heard of that on the LiveCylce forums (ie. from Adobe site). I think it was an issue/bug with the newer (9?) version of LiveCycle. What's your version?

Former Member
0 Kudos

I`ve uploaded test interactive form, which can show you this problem.

http://rapidshare.com/files/240737738/presence.pdf.html

If this is possible could you check it and get out what is the reason of non-hiding component? JavaScript is inside exit-function of DDL.

Former Member
0 Kudos

Solved this problem. The case of it was form properties. "ALD -> Edit -> Form Properties -> Preview -> Preview Adobe XML Form As:" Whenever stays "Static PDF Form" in there - nothing would be changed, but when u set "Dynamic XML Form" - form changing begin to work. There is also one preference in ALD Offline creating which could lead to that problem.

Tools -> Options -> Document Handling -> Default File Types for New Forms - should be set "Dynamic XML Form", otherelse even ebove mentioned preference FOR OFFLINE FORMS won`t help you.

Former Member
0 Kudos

Hi Nikita,

How do you solve your problem? I am also facing the same problem. I applied all the changes you suggested , but still it is not working.

I am working on AdobeLiveCycleDesigner 8.0

Could you please throw some light on this problem.

Regards,

Charan.

Former Member
0 Kudos

Hi,

For any Change event use this code as first line in any language (JavaScript/FormCalc).


var dropdownvalue = this.boundItem(xfa.event.newText);

Now compare your "if" statement with the variable "dropdownvalue". It works fine. It helped me a lot while designing forms. Or you can also code your "if" statements in "exit" event without writing the above statement. But here everytime you need to capture the previous value selected and then compare with the current selected value. If it is different then proceed. This needs to be done because without selecting any dropdown value, if you just click on the dropdown and if click on anypart of the form then exit event triggers.

Regards

Pradeep Goli

ChrisSolomon
Active Contributor
0 Kudos

Rather than worrying over setting every little element to show/hide in script, why not

"wrap" them ALL in a subform and simply show/hide that subform? It works the same, takes less code (ie. less translation) and is much easier. My $0.02. Also, you might want to check using the "exit" event instead of "change" to insure it works like you want.

Former Member
0 Kudos

I have already tried to make subform Passport invisible but got same result as i described above so decided to make them invisible one by one. Have just now replaced this code into exit function but nothing has changed.

ChrisSolomon
Active Contributor
0 Kudos

Sorry...I got them backwards (doh!)...yes, for drop-downs, I code my "did something could picked/changed" code in the "Change" event.

Here is an example where the user has picked a position. If they then pick a new position (or change the one selected), I want to hide other form areas until they click a button to pull back position data for the "newly selected position".....


----- data.MainPage_SF.NewPosition_SF.NEW_POSITION_SELECT::change: - (JavaScript, client) ----------

//Hide areas (hide will take area out of layout, ie. shrink, whereas invisible still holds the space)
MainPage.NewPositionDetails.presence = "hidden";

Make sure the object path to your subform or whatever you are trying to hide is correct. I always select that element and then just copy it path from one of it's own events to make sure. Also, keep in mind that the elements are in relation to each other so how you reference them is important.