skip to Main Content

I created a PDF form with PDF-Xchange.
In this PDF I want to integrate a Button that triggers the sending of an email. I create a Variable of "FullName", which consists of two fields. the “First Name ID” and the “Last Name ID”. This variable is used to sign the email.

Here is my Java script, it works fine in PDF-Xchange, different PDF Reader, but does not work in Acrobat Reader.

var FullName = this.getField('Prenom ID').value + ' ' + this.getField('Nom ID').value;

this.mailDoc(true, "[email protected]", "", "", "Fiche d'inscription ", `Mesdames, Messieurs,rnrn veuillez trouvez ci-joint ma(es) fiche(s) d'inscription, afin de m'enregistrer à votre service offet.rnrnJe vous remercie d'avance pour l'enregistrement.rnrnCordialementrnrn ${FullName}`);

Trying to insert in a email body a variable

2

Answers


  1. I think adobe reader disables JavaScript by default. You need to enable it manually

    Login or Signup to reply.
  2. There is no problem with string handling switch the string to a msg alert and we see it is OK the reason it is rejected is the method in use.

    enter image description here

    Points to beware of

    Fields should not contain spaces, if possible use underscore. Here I used PreNomID and NomID

    Default OS emails are a thing of the past, so there problems getting submittals to work the way they did last century when the "Forms Submittal" system was designed.

    There are multiple ways to trigger a submission in several formats such as send data in one of three containers via 2 different routes. Most likely to work is posting lighter weight data only to a Server as generally used by government forms.

    When sending data in the background only the field contents (including any text field contents are sent), so using those methods your free format text needs to be in a field container.

    So overall I tried 2 buttons the first using email system attempts to work but because I have no server to send to and will not install an email sender as "Too old hat". It fails like this without trigger the JavaScript warning shown as from the other method that presumably you tried.
    Note in Acrobat there is no way to use email it is "greyed out"

    enter image description here

    Answer use the submittals system in Acrobat Pro via a server posting, it should not trigger a JavaScript warning as it is Adobe designed method for reader to transmit FDF from outwith a PDF.

    When you say it work in other systems for you that is because your device has ben structured to work different to others. However, for me (and potentially all your clients) your method requires me to sign a string of dependencies, and as a user I do not need to sign into mail systems that way.

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search