When working with PDF forms in offline mode via e-mail, you may use advanced synchronization features. Such data as sender’s e-mail, mail subject, date and other could be exposed to the form. So called “Staff only part” of form may be filled-in automatically. To enable this feature all you need is a simple built-in script and couple of read only fields in the form.
Let’s say, we wish to have sender’s e-mail address and subject to be stored in the form. Then we need to add corresponding fields in the form: EmailFrom and EmailSubject.
Now it’s time for script.
if (form.IsSubmitFromEmail()) { data.resolveNode("EmailFrom").value = form.SourceParams["EmailFrom"]; data.resolveNode("EmailSubject").value = form.SourceParams["EmailSubject"]; }
Go to “Developer” tab and press “Form Submit” button. Drag and drop “Execute script” option from the list on the left. Place it above “Save Form” option. Click on the “enter script” field. Usually it’s green color. And input your script.
All the accessible options could be found in the help section.
Compile script. If it is ok, save it. And deploy the form. Let’s see, what we have now. Now, when form is filled-in and sent to server, data from the original mail will be synchronized with the SharePoint columns and with the form itself.
I was following the instructions on this page (http://blog.pdfshareforms.com/advanced-offline-pdf-form-features-for-sharepoint/) and the email was always blank. I switched the line “SourceParams[“EmailFrom”];” to the following “SourceParams[“EmailSender”];” and it worked. I am wondering if this is a error in this documentation or if it is a version thing (we are on version 2.5.11.2478)?
Hi Jason
Our support will contact you on this. Thanks for the information.