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

JavaScript for summary text field.

New Here ,
Apr 17, 2017 Apr 17, 2017

Hi all,

i previously designed a pdf in livecycle designer as part of acrobat 9. Now the company has upgraded to 11 and I've had to redo the form

I previously had a radio button that would take all the values from all the fields and populate them in an empty text box that would then be copied and pasted as a summary. However I can't get the code working now and am after any help you may be able to offer.

The code was

F.P1.Button3::click - (JavaScript, client)

DAHRTS.rawValue = "Callsign: " + Callsign.rawValue

+ "\nType: " + Type.rawValue

  + "\nDeparture Aerodrome: " + Departure.rawValue

   + "\nDestination Aerodrome: " + Dest.rawValue

    + "\nEntry Position: " + Entry_Posn.rawValue

     + "\n Time: " + Entry_Time.rawValue

      + "\n Level: " + Entry_Level.rawValue

       + "\n Track: " + Entry_Track.rawValue

        + "\nExit Position: " + Exit_Posn.rawValue

         + "\n Time: " + Exit_Time.rawValue

          + "\n Level: " + Exit_Level.rawValue

           + "\nImpact (consequence): " + Impact.rawValue

            + "\nSSR code: " + SSR.rawValue

             + "\nHow VCA was detected: " + Detect.rawValue

              + "\nReason for VCA if known: " + Reason.rawValue

               + "\nFollow up actions: " + Follow_up.rawValue

                + "\nPilot contact details: " + Pilot_details.rawValue

                 + "\nAirspace: " + DropDownList1.rawValue

                  + "\nOther: " + Other.rawValue

F.P1.Button3::enter - (JavaScript, client)

Dahrts was the name of the empty text box that the button would cause to populate.

Any ideas?

TOPICS
Acrobat SDK and JavaScript , Windows
407
Translate
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
LEGEND ,
Apr 18, 2017 Apr 18, 2017

Do I have this right? You've chosen not to buy an upgraded LiveCycle Designer, and are instead remaking your Designer (XFA) form in Acrobat (Acroform)? If so, you need to know that the JavaScript model and language are COMPLETELY DIFFERENT. You'd need to use getField to associate each field with a scripting variable.

Translate
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
New Here ,
Apr 18, 2017 Apr 18, 2017

Well that explains it. I used live cycle as part of acrobat 9 and now with acrobat 11 its not included.

So could you explain what the new script would look like.

I need it to look something like this;

Callsign: (Callsign value)

Type: (Type value)

etc

Am I able to have it that when I click on a radio button it populates that info into an empty text box? If so I don't know how to script it to display in the empty text box with the line descriptor i.e.  callsign: (then populate the value from the completed field).

I hope I have made sense.

Translate
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 ,
Apr 18, 2017 Apr 18, 2017
LATEST

For a field with the name "Callsign" use this.getField("Callsign").value

Translate
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