cancel
Showing results for 
Search instead for 
Did you mean: 

visibility of subforms

Former Member
0 Kudos

Hello,

how can I dynamically change the visibility of a subform during runtime, depending on the type of enduser?

can you please give me a code example?

thank you for your help!

Best regards, Patrick.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I hope this blog might be useful...

/people/juergen.hauser2/blog/2006/01/31/access-mode-and-presence-of-fields-on-adobe-interactive-forms

There is an property PRESENCE for subform where you can set the VISIBILITY. I hope you can try out.

Regards,

<i><b>Raja Sekhar</b></i>

Former Member
0 Kudos

Hi,

there are two things you could do.

1. Bind both subforms to data nodes that are present or not present depending on the user. Check "Repeat subform for each data item" for both subforms. This means that a subform only appears on the form if the data node is present in the data stream.

2. Use a script where you set the presence property according to the value of a data node. The script is one if-statement where in the then-branch one subform is set to visible and the other to hidden and in the else-branch vice versa.

if (xfa.record.node.value=="usera") {

subform1.presence="visible";

subform2.presence="hidden";

}

Node is the name of the data node. And the expression to access subform1 and subform2 may differ for your form.

I recommend the first approach since it is a data-driven approach without scripting.

Best regards

Juergen Hauser