Highlighted

remove field permamently

Avatar

02-08-2008

Hi,

Is it possible that when a user open up a form (reader extended), and upon clicking a button, delete away certain fields in the form, like a textbox or subform. And when user save and reopen the form, the deleted fields will not appear. Possible? Thanks.

Replies

Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

05-08-2008

If you make the fields hidden then they exist but they are not part of the layout. You will have to store the state of the form so that you can set it when the form opens for the second time.
Highlighted

Avatar

05-08-2008

Hi Paul,

There is a problem, if the user disable java script from the Adobe Reader, he or she will be able to view the hidden fields when the form is opened for the second time. Any solution?

Thank you.
Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

06-08-2008

Then the only other way I can think of is to have two different templates and export the data out of the 1st one and import it into the second one. If the fields are not in the second one then the data for those fields is ignored.
Highlighted

Avatar

14-08-2008

Hi Mike,

You can also set a new hidden field value to a new value after the button is clicked. Then in the initialize of the form you can hide those fields by looking at the given hidden value.



//at first

XHidden = 0;



//when button is clicked

XHidden = 1;



if(XHidden == 1)

field1.presence = "hidden";



Asiye