• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Stamp not working - Please help

Community Beginner ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

I'm new here however, I'm working with an existig stamp and code done by someone else.  When  I post the stamp, the dialog pops up for me to select one checkbox and input text in to 5 text boxes. The other 2 text boxes on the dialog (name, date) are prepopulated (via the code) .  When I click Ok, the stamp only displays the current date and output from one selection.  It is supposed to display:

The checkbox I clicked 

The text I entered in the correspoinding fields 

And the prepopulated name should carryover as well.

 

Why is only 1 field displaying properly?  

TOPICS
JavaScript , PDF forms

Views

12.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 12, 2021 May 12, 2021

The radio-buttons in the stamp file itself should be named "Action" for your current code to work. You can name the ones in the dialog whatever you want (as long as its 4 characters). The two are not related.

Votes

Translate

Translate
Community Expert ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

The code is not working correctly. Without seeing the stamp file itself we can't help you further with this issue.

Why not ask the person who created it to fix it for you?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

I've attached the file and the person who created it isnt available.  Thanks for your help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

Someone edited the code in the file via the Edit All JavaScripts command, which you should never do (despite its name), and it completely messed it up. I hope you have an earlier version of this file saved, as fixing this issue is not always possible.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

I do.  The task is to edit or update the stamp.  So I suppose the question is how is the best way to do that?  I  took the flat image.pdf of the stamp and copied then modified the code from the old stamp in to it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

Copy the code from field to field. It would be an easier task if all the code was placed under one field, or even as a doc-level script.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

Doc level...I copied thecode.txt to the Java Scripts folder and changed to .js and I hv it in the stamp. Does it only need to be in one location only?

And all the code should go in one field? Does it matter which?

[Private info removed]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

Do not edit the code via Edit All JavaScripts! Nor should you copy it from there, as it includes a bunch of tags that you shouldn't enter anywhere else.

 

Copy the code from each field and place it under one field.

You'll need to adjust all the instances of event.value to this.getField("").value, though.

 

And don't reply by email. It includes all your private info in the signature and posts it to the forum.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

Adjust all the instances to match the new field names, correct?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

Yes.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

Cool.  Will try later this eve.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 07, 2021 May 07, 2021

Copy link to clipboard

Copied

Hi,

 

So I opened both stamp files and copied code from the textfield properties of the field (it contained all of the code, btw) in to the appropriate field in new stamp (properties, calculate, custom calulated script, edit.  deleted existing code and replaced w/pasted code from old stamp).

 

Edited pasted code (in that window).  I changed stamp name, added 2 new jsadmdlg1 variables and 2 new getfield lines

Saved file and closed acrobat

Reopend and tried

 

When I placed stamp the old dialog appeared and when I clicked Ok, the new dialog appeared w/o any of the data I entered.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 07, 2021 May 07, 2021

Copy link to clipboard

Copied

Share the new file with us, please.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 07, 2021 May 07, 2021

Copy link to clipboard

Copied

Attached. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 07, 2021 May 07, 2021

Copy link to clipboard

Copied

The issues I described before are not fixed in this version.

Look at the top of the Edit All JavaScripts window:

 

try67_0-1620391508870.png

 

Those tags should not be duplicated. It means the file's internal code structure is corrupt.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 07, 2021 May 07, 2021

Copy link to clipboard

Copied

Is the only solution to start from scratch?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 07, 2021 May 07, 2021

Copy link to clipboard

Copied

Pretty much, yes.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 10, 2021 May 10, 2021

Copy link to clipboard

Copied

I created a new stamp file and copied all of the code to one field.  Then I edited code to reflect the new fields and stamp name.  

When the stamp is placed, the dialog appears, yet when I fill it out, ONLY one field is captured. I don't understand.  The "old" stamp that contains the code works.  Why is the data input not showing up on the new stamp? 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 10, 2021 May 10, 2021

Copy link to clipboard

Copied

Please share the new file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 10, 2021 May 10, 2021

Copy link to clipboard

Copied

File attached.  

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 10, 2021 May 10, 2021

Copy link to clipboard

Copied

Check the console for errors.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 11, 2021 May 11, 2021

Copy link to clipboard

Copied

This is what I get

 

TypeError: getField(...) is null
286:App:Calculate

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 11, 2021 May 11, 2021

Copy link to clipboard

Copied

That means you entered an incorrect field name.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 11, 2021 May 11, 2021

Copy link to clipboard

Copied

Ok.  I will triple check field names.  BUT I have the code in 2 places:

The Custom calculation script of a stamp field and as a .js file in C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\Javascripts 

Is that right?

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines