Copy link to clipboard
Copied
I am creating my first form using Adobe Acrobat Pro. I have researched my scripts and think I found the right one. But it does not seem to be saving. As soon as I type it in and click "OK", it disappears. When I got back to edit it, the properties have defaulted to "this field is not calculated". What do I need to do to fix this?
Copy link to clipboard
Copied
You can use the notepad editor. It is part of MS Windows.
Copy link to clipboard
Copied
Can you add a new field and enter the script there?
Copy link to clipboard
Copied
I've tried to do that and it still did not save. It is almost like a have an "always default to 'This field not calculated' setting.
Copy link to clipboard
Copied
Did you press the OK button at the bottom?
Copy link to clipboard
Copied
Yes. And that is when my script disappears and the radio button immediately goes back to "This field not calculated".
Copy link to clipboard
Copied
Try adding following simple script:
var a = 1;
Copy link to clipboard
Copied
Same thing happens. It is as if I enter nothing at all into the
"Custom calculation script:", "Edit", "Create and Edit JaveScripts" field.
Copy link to clipboard
Copied
Nâo quero mais receber esses arquivos
Enviado pelo meu Windows Phone
Copy link to clipboard
Copied
Delete the field. Save the file. Close the file. Open the file. Add a new field (maybe with a different name). Try adding the calculation script again.
Copy link to clipboard
Copied
I tried as you suggested. Same thing. Clears as soon as I hit OK and goes back to "Value is not calculated". Do I have to do something to enable this?
Copy link to clipboard
Copied
Sounds like the file is corrupt... Did you by any chance enter the code via Edit All JavaScripts? If so, you shouldn't have. That can cause serious issues, which are not easily solved later on.
One last thing you can try is to apply it using a script, like this:
this.getField("NameOfField").setAction("Calculate", "Enter your code here");
Run this command from the JS Console and then see if that works.
Copy link to clipboard
Copied
This is the one and only script I have attempted. This is my first form created from an excel file initially. It is not going well. I've not tried this on two different files. I even tried creating a new file from the raw excel and I have the same issues. It bothers me that I am trying to add a "text field" and then telling it to calculate something. But I don't see any other options for fields like this.
Copy link to clipboard
Copied
Try this:
In the category JavaScript of the preferences use an external JavaScript editor.
Copy link to clipboard
Copied
Actually, this is getting me somewhere.....
Adobe Acrobat 9 Pro: PDF Forms: Inserting an Automatic Date Field, UWEC
Copy link to clipboard
Copied
At the page level I can add a java script. At the field level I still can't. I don't understand why.
Copy link to clipboard
Copied
Did you try an external JavaScript editor?
Copy link to clipboard
Copied
Bernd. Sorry, I did not. That goes beyond my understanding (I am not a programmer - my last programming class was decades ago!) and I am not allowed to download anything to my company computer.
Copy link to clipboard
Copied
You can use the notepad editor. It is part of MS Windows.
Copy link to clipboard
Copied
That worked! Hats off to you!!!!!! Now to test my scripts.
Copy link to clipboard
Copied
I am havig the exact same issue, except my code is in the All JavaScripts area - not associated with any specific filderin terms of placement. I have been copying and pastung the code written by my developer across multiple forms. Works fine - unti now. Have the code is already thre. I just need to paste in a missing section. I get it from a form I know is working correctly. I paste it at the end of the existing code. I click OK, NOTHING activates the Save button. I modify a random field name to force save to be avaiable, repeat copy/paste - NOTHING in my Java gets saved. I paste Jave into Notes (i'm on a Macbook Pro) Copy it out from that plain text, repeate steps - NADA.
I need help!! Thank you. (I am also NOT a coder.)
Find more inspiration, events, and resources on the new Adobe Community
Explore Now