Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Hiding subform in Adobe Forms with JavaScript

former_member787016
Discoverer
0 Likes
9,503

Hey all,

I googled and read a lot of advice in other questions but I don't get my problem fixed:

Whether it's an invoice or a cancellation, the title of the document is meant to be different.

I got 2 subforms and depending on 2 criterias I wanted to show just one of them. Inside of each subform there is a different text to meant to be the title.

data.Information.INFOFENSTER.TITLETEXT.INVOICE::initialize - (JavaScript, both)
if (this.LFAKS.rawValue != "" && this.LFTYP.rawValue != "01")
{
this.presence = "visible";
}
else
{
this.presence = "hidden";
}

In the context I inserted the to variables as LFAKS and LFTYP into the folder "INVOICE" (which is in 2 other folders). My forms also got the right binding, I think.

Is something wrong with the coding or do you have other ideas?

Thank you!

6 REPLIES 6
Read only

MateuszAdamus
Active Contributor
0 Likes
7,532

Hello alexity

Try this.presence = "inactive" instead of "hidden".

Kind regards,
Mateusz
Read only

0 Likes
7,532

Hello mateuszadamus ,

unfortunately it did'nt help...

Read only

0 Likes
7,532

In this case please check your condition and/or the spot you're executing the script in.

I know for a fact that presence = "inactive" hides elements, I used it myself.


Kind regards,
Mateusz
Read only

former_member717457
Participant
7,532

Hi,

Try this..

if(TextField2.rawValue == null)

{ Table2.Row1.Subform2.presence = "hidden";

}

else

{

Table2.Row1.Subform2.presence = "visible";

}

Read only

0 Likes
7,532

I don't want to hide table rows, so I don't know how that should work.

Read only

former_member717457
Participant
7,532

Hi,

Pls go-through the following link.

Adobe Form Subform Hide/Visible Problem - Adobe Experience League Community - 234048

Thanks

Sathish Kumar Sidhaiyan