on 08-11-2006 1:26 PM
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.
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.