Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

hidding / showing

Avatar

Level 3

Hello

I need to hide fields with javascript it s not working with this :

myField.presence = "hidden";
xfa.host.messageBox(myField.presence);  //return hidden the the field steel in the screen

Thanks for your help !

1 Accepted Solution

Avatar

Correct answer by
Level 10

The problem could be the reference to the control was not correct.

Or your form was not set as a Dynamic XML form.

You need do the following to make the Form as Dynamic.


     1) Goto File menu -> Form Properties and select Defaults tab. Change the Default Render Format as Dynamic XML form

     2) Select the Preview Tab. Set the Preview type as "Interactive Form" and Preview Adobe XML form as Dynamic XML form

     3) Finally while saving the PDF select Save As Type as "Adobe Dynamic XML Form".

I have a put in a sample file for your reference with the similar logic.

In my example, I am only hiding and displaying them based on the previous answer.

https://acrobat.com/#d=LlEgTgo3**oSPJlYGxGTKw

Thanks

Srini

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

The problem could be the reference to the control was not correct.

Or your form was not set as a Dynamic XML form.

You need do the following to make the Form as Dynamic.


     1) Goto File menu -> Form Properties and select Defaults tab. Change the Default Render Format as Dynamic XML form

     2) Select the Preview Tab. Set the Preview type as "Interactive Form" and Preview Adobe XML form as Dynamic XML form

     3) Finally while saving the PDF select Save As Type as "Adobe Dynamic XML Form".

I have a put in a sample file for your reference with the similar logic.

In my example, I am only hiding and displaying them based on the previous answer.

https://acrobat.com/#d=LlEgTgo3**oSPJlYGxGTKw

Thanks

Srini