Changing field appearance programatically?

Avatar

Avatar

_Bill_Bain_

Avatar

_Bill_Bain_

_Bill_Bain_

28-10-2008

We have a user form that is filled out and then printed. I would like to change the appearance of the fields from Sunken Box to None prior to printing to make the printed copy look less like a form. I've not been able to locate a property that corresponds to the Appearance option in Designer. It seems like there should be one available in either Javascript or FormCalc, but I've not been able to locate one. Is there such an "animal" and if so, what is it?



Thanx!



Bill Bain

Atlanta

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

29-10-2008

Send the form to livecycle8@gmail.com and I will have a look when I get a chance.
Highlighted

Avatar

Avatar

_Bill_Bain_

Avatar

_Bill_Bain_

_Bill_Bain_

29-10-2008

Great! Thanks for all your help.



Bill
Highlighted

Avatar

Avatar

_Bill_Bain_

Avatar

_Bill_Bain_

_Bill_Bain_

31-10-2008

Paul -



Thanks for the help. The script worked perfectly -- I added some app.alerts in various points to understand what was going on. I hadn't thought about using scripts -- that's a great idea.



I do have another issue that's arisen -- I want to use the Reader Extensions so that the users can email the completed form. After the script runs, the screen looks perfect. However if they either save the completed form or email the form, what gets saved or emailed is the form with the data, however, none of the formatting that the script applies (hiding borders, protecting fields) is in the emailed or saved copies. It's like the script never ran. I tried running the script as a preSave event, instead of on a button click before using "File, Save", but I can't add the Reader Extensions because it runs the script when I try to save the form in Acrobat (after adding the extensions)!



Why would the screen look perfect but the saved form not match the screen?



Baffled again . . . .



Bill
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

31-10-2008

On the Form Properties under the Defaults tab there is a Radio Button that indicates whether to keep the state of the form that the script changes has done or not. Change the radio button to automatic and try it again.
Highlighted

Avatar

Avatar

_Bill_Bain_

Avatar

_Bill_Bain_

_Bill_Bain_

31-10-2008

Nuts. I get the following error message:



"1305 Static PDF Form

Dynamic XML Form Target version does not support the Preserve Scripting Changes To Form When Saved option. Select File > Form Properties, click the Defaults tab and, under Preserve Scripting Changes to Form When Saved, select Manually."



The documentation indicates that Reader 8.0 is required. The form has to run with Reader 7.0.5. So how do I preserve the scripting changes manually/can Reader 7.X do this?
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

31-10-2008

Nope ...we have to do it through script when we load. We will need to know that we have to display without borders so we can have a hidden field that will act as our flag. If we populate the hidden field with a known value when we click the button that prepares our form then we can check the status of the flag and act accordingly. The event you want to do this on is DocReady (at the form1 node) then simply:



if (flag.rawValue == "whatever"){

call border hiding code again

}
Highlighted

Avatar

Avatar

_Bill_Bain_

Avatar

_Bill_Bain_

_Bill_Bain_

01-11-2008

Hah! Now I understand. Putting the code in the docReady event causes the code to operate when the form is opened by the *recipient*! Neat! It works perfectly.



Thank so much for the help!



Bill