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

connect if/thenstatement with submit form function

New Here ,
Jun 09, 2020 Jun 09, 2020

Copy link to clipboard

Copied

Hello Community,

I was wondering if I can combine the if then statment with the submit form function. 

 

I already managed to send specific data of specific fields to an email address after hitting the "submit form" button I created.

 

I was wondering if I can just send the fields where information has been changed? 

 

if "data in field A was changed" then send it

if "data in field has not been changed" don´t send it

 

Thanks in advance!

TOPICS
Acrobat SDK and JavaScript

Views

379

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 ,
Jun 09, 2020 Jun 09, 2020

Copy link to clipboard

Copied

Changed since when? Compared to what?

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
New Here ,
Jun 17, 2020 Jun 17, 2020

Copy link to clipboard

Copied

The fields should already be prefilled and if the information changes, then it should be sent 

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 ,
Jun 24, 2020 Jun 24, 2020

Copy link to clipboard

Copied

LATEST

Yes, you can do this.  The "doc.submitForm()" function includes a parameter for submitting specific data fields. 

https://acrobatusers.com/tutorials/submitting-data/

 

The trick is detecting which fields have changed. The easiest way to do this is to save a list of all the current field values to a hidden field when the PDF is submitted. Then compare the values on the next submit. This is an advanced scripting task. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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