Skip to main content
Participant
June 9, 2020
Question

connect if/thenstatement with submit form function

  • June 9, 2020
  • 1 reply
  • 676 views

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!

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
June 9, 2020

Changed since when? Compared to what?

kwestionAuthor
Participant
June 17, 2020

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

Thom Parker
Community Expert
Community Expert
June 24, 2020

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 PDFScriptingUse the Acrobat JavaScript Reference early and often