Expand my Community achievements bar.

Changing object visibility in XDP forms.

Avatar

Former Community Member
Hi,



I have a problem about changing visibility of objects in XDP forms.

I am trying very simple code which simply changes text fields visibility

for each click on the button. Here is the click event of the button below :



form1.#subform[0].Button1::click - (JavaScript, client)



if(xfa.resolveNode("form1.#subform[0].TextField1").presence=="visible") xfa.resolveNode("form1.#subform[0].TextField1").presence = "invisible";

else

xfa.resolveNode("form1.#subform[0].TextField1").presence="visible";



Although presence value is changing, the text field remains visible on form! (Tried also formcalc equivalent of the code above)



I created a PDF form and retry this. The code is working for PDF forms but not XDP forms.



Does anybody knows what is the problem?

Why this does not working for XDP forms?



Thanks



Cihan
2 Replies

Avatar

Former Community Member
send me the form mergeandfuse@gmail.com, will take a look @ it

Avatar

Level 9
Try saving your XDP form as a DYNAMIC pdf form. Then close Desiger, reopen the PDF, and save it back as XPD. For some reason, this switches some sort of flag in the XDP which tells it to render the XDP as a dynamic rather than static PDF.

Howard

http://www.avoka.com