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!
Copy link to clipboard
Copied
Changed since when? Compared to what?
Copy link to clipboard
Copied
The fields should already be prefilled and if the information changes, then it should be sent
Copy link to clipboard
Copied
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.