PDF forms: extraction of data fields using javascript

Hi, I was wondering if someone could help me...

I have created a PDF form which, once the user fills out the fields, he or she will click on a button to send the form by e-mail to their Manager. Once the registration form is authorized by the Director, the Manager will be click on another button, which will forward the form to the original user. The user would have filled their email address in one of the fields in the form. Is it possible to extract data from the field e-mail address using javascript?

Thank you very much!

You would have to do something like this:

// Get the email addresses
var email1 = getField("email1").valueAsString;
var email2 = getField("email2").valueAsString;

// Send the email
try {
    mailDoc({
        bUI: false,
        cTo: email_addr1 + ";" + email_addr2,
        cSubject: "The subject of the mail",
        cMsg: "The message body of the email"
    });
} catch(e) {
    app.alert("Could not send email, sorry.", 1);
}

Note that the e-mail addresses must be separated by a semicolon, as shown. Also, affecting false bUI will only work if the code is run form a privileged context, as in a JavaScript file to the folder level.

If you want to hard-code one of the e-mail addresses, it would look like:

        cTo: email_addr1 + ";[email protected]",

Tags: Acrobat

Similar Questions

  • How can I create a PDF form that contains data fields and calculated fields?

    Hello, I need to create PDF forms that has

    -Fields that are read from a MS SQL Server database, once the user enters a field other fields must be read from an underlying database

    -Calculated fields

    what PDF forms product supports this? Once this file created is also filling end-user which form has any kind of special licenses, otherwise he will be able to fill this with Adobe Reader?

    You need to expand the PDF form using Adobe LiveCycle Designer if you want to be able to connect to a database.

    And Yes, it should be possible to use the file in Adobe Reader after that.

    For more questions on LCD forms are trying this forum: LiveCycle Designer

  • I need to create a PDf form with specific editable fields, including the ability to insert an electronic signature and to be able to save the completed form. What version of adobe supports this?

    I need to create a PDF form with specific editable fields, including the ability to insert an electronic signature and to be able to save the completed form. What version of adobe supports this?

    subscription dc Acrobat or purchase, Plans and prices | Adobe Acrobat DC

  • try to concatenate address below fields using javascript

    try to concatenate address below fields using javascript

    this.rawValue = xfa.resolveNode ("#subform [1]..") RawValue CAOName") +"\n"+ xfa.resolveNode (" #subform [1]. ") Addr1") .rawValue | « \n »

      if((xfa.resolveNode("#subform[1].Addr2").rawValue)!= null)
      {
      xfa.resolveNode("#subform[1].Addr2").rawValue}
      else
      {xfa.resolveNode("#subform[1].City").rawValue||xfa.resolveNode("#subform[1].State").rawValue||xfa.resolveNode("#subform[1].Replyzip").rawValue

    but only the name and the addr1 print, can someone help me fix my script... Thank you

    DE1209

    Try something like this:

    this.rawValue = xfa.resolveNode("#subform[1].CAOName").rawValue + "\n" + xfa.resolveNode("#subform[1].Addr1").rawValue + "\n";
    if ((xfa.resolveNode("#subform[1].Addr2").rawValue) != null) {
        this.rawValue = this.rawValue + xfa.resolveNode("#subform[1].Addr2").rawValue;
    } else {
        this.rawValue = this.rawValue + xfa.resolveNode("#subform[1].City").rawValue + xfa.resolveNode("#subform[1].State").rawValue + xfa.resolveNode("#subform[1].Replyzip").rawValue
    }
    
  • Change the label of text form field using javascript.

    Hi all, need your help.

    I have a field that will provide different information depending on the type of document.

    I would like to change the label of the field of javascript in da

    Thank you very much

    Andrei

    You can always set the page element and follow the following to refresh a specific region

    APEX Oracle report update the easy way & laquo; Warp11. ::. Group knowledge Oracle Apex

    Check the following for an option in jquery

    change the text on the label based on toggle? -jQuery Forum

    jQuery - label text change based on radio click - Stack Overflow

    Kind regards

    Vishal

    Oracle APEX 4.2 reports | Packt Publishing

    Vishal blog

  • PDF form: fill in the field with the value of another field

    Hello

    I have a PDF form that one of our employees has to be completed on a regular basis.

    There is a 'product' - text field, which is present on the form several times, which will contain the same information.

    From now on, my colleague has fill all these these one by one manually. But with the copy - paste, it doesn't take more than a few seconds.

    However, to facilitate work a little, I want to it to be able to simply fill out one of the fields (can be a specific, must not be dynamic) and all the other 'product' - fields automatically takes the value of the field of this first.

    How can I accomplish this?

    I noted the possibility of JavaScript controls.

    I am familiar with basic JavaScript, however never used it for PDF files.

    Any help and pointers would be appreciated.

    Thank you very much.

    This isn't a problem with script. Just give each field of the same name. Once the field names are the same, a change in one will be to another. For some reason that it does not work with standard HTML forms, probably the reason why you ask.

  • date field using less javascript code

    Hello
    How less can I date since another date using java script code
    <script>
      function balancefeeItems(){
        function getVal(item){
       if($x(item).value != "")
         return parseFloat($x(item).value);
       else
         return 0;
        }
       $x('P16_NO_OF_DAYS').value = 
      (getVal('P16_DEAL_CLOSE_DATE') - getVal('P16_DEPARTURE_DATE')+1);
      }
    </script>
    I want less P16_DEAL_CLOSE_DATE-P16_DEPARTURE_DATE. I try to run the code, but it does not work very well.




    Thanks and greetings
    CORINE

    Published by: Sophie on February 9, 2012 01:10

    That your date picker object has its own format mask? It would be in the 'Settings' section for this element.

    You can have a cool log-in to pick up this change, I'm not sure that casual.

  • To remove a Widget (Instance field) using JavaScript?

    Hello

    I'm trying to createt a JavaScript Action (sequence) that removes unwanted forms fields, but some fields share the same name. I just want to remove some widgets/instances. I can delete fields with the 'removeField()' function, but it does not work with the widget / instance of a field; all instances of the field are deleted.

    For example:

    There are two fields on the form. They have the same name, called "address".

    So, there are two fields with these identifiers:

    address #1

    address #2

    I would like to delete the first ONLY.

    So, I tried the function and it fails:

    doc.removeField ("address.1");

    I also tried:

    doc.removeField ("address #1");

    What I'm trying to are not supported or is there another way to do it?

    I use Acrobat X Professional on Windows 7.

    Thank you.

    Thank you. I built a function using the number 1 of the approach. I hope this helps someone else.

    function removeFieldInstance(fieldInstanceName) {
         var keepFields = [];
    
         //Get the value before the last period
         var idPos = fieldInstanceName.lastIndexOf(".");
         var parentFieldName = fieldInstanceName.substring(0,idPos);
    
         //Go through each instance and get the field properties
         instanceID = 0;
         while(true) {
              var currentInstanceName = parentFieldName+"."+instanceID;
    
              //Increment the instanceID
              instanceID++;
    
              //Skip this instance if it is the one we are removing
              if(fieldInstanceName==currentInstanceName) {
                   continue;
              }
    
              //Get the field instance
              var fieldInstance = getField(currentInstanceName);
    
              //Check if this instance is null (exists)
              if(fieldInstance==null) {
                   break; //Stop the loop
              }
    
              //Get the Rectangle, Page Number, Field Type properties
              var fieldName = parentFieldName;
              var fieldType = fieldInstance.type;
              var fieldPage = fieldInstance.page;
              var fieldRect = fieldInstance.rect;
    
              //Add the properties to an array
              var keepField = [];
              keepField[0] = fieldName;
              keepField[1] = fieldType;
              keepField[2] = fieldPage;
              keepField[3] = fieldRect;
    
              //Add the field array to the keepFields array
              keepFields.push(keepField);
         }
    
         //Remove all the field instances
         removeField(parentFieldName);
    
         //Create all the fields
         for(var i=0; i		   
  • Extraction of data to use in SUMIFS

    A question about the SUMIFS function.

    In my formula below, the SUMIFS function shows the 1st test value stay $Année. The 2nd test is $ month of stay

    Each refers to 2 columns hidden, where we find a number representing the year and the other the month extracted a column "date."

    The couple of month/year, I want to talk about is the one in the pink column of the period case.

    (1) this way of doing things is quite complicated because it requires that I created first 2 columns where we find the numbers related to the year and month.

    I would prefer rather to check directly the column 'date' I'm referring to, I look for the year and then the month. Something like that...:

    In this photo the 'date' column is brown.

    But obviously SUMIFS has a problem with it; It is said: in the function SUMIFS, all values of type interval must be same size

    Am I missing something, or is it really impossible to use another function to extract the value to test?

    (2) because I have 2 conditions to check at the same time, is there a particular use way AND SUMIF and SUMIFS function?

    Thank you all for your help and your time.

    Lopez

    Hey Lopez,

    I guess that your translation refers to the line below in the description of SUMIFS.

    • all values of type interval must be the same size
    • All collections must be of same size.

    What this means, is that each column values of test (Brown) must have the same number of lines as the column of the sum (blue) values.

    Kind regards

    Barry

  • Check whether the checkbox in a form is activated or not using javascript

    When you click a checkbox (TBD) it must set the value of a field with a default value "1234". If uncheck us the box, it must set the field to null.
    I set the box as STATIC2:; 1234 in the form.

    I used the event onClick on the box and calls a function to update the column.
    Inside the function I check if the box is checked using
    If (document.getElementById('P4_TBD').checked = true)
    {
    document.getElementById('P4_COL1).value = '1234';
    }
    on the other
    {
    document.getElementById('P4_COL1).value = "; / * or $s ("P4_COL1", "");

    }

    It works only when the box is checked. If the checkbox is unchecked is not setting the field to null.
    I checked document.getElementById('P4_TBD').checked = false instead of the else clause. It does not work.
    Please help me on this issue.

    Thank you
    Ravi

    When you use the check box or option button, your button ID is using an index. If you create a group of 3 check with ID = "MY_CHECKBOXES" boxes, APEX will create the following ID for each of your options: MY_CHECKBOXES_0, MY_CHECKBOXES_1 and MY_CHECKBOXES_2. If you want to test if the first checkboxe is checked, you will use document.getElementById('MY_CHECKBOXES_0').checked.

    I didn't test a single checkbox, but I would expect your check to be "TDB_0" not "BDM" which is the frame that surrounds your checkbox group.

  • PDF form: blocking of the fields before you send it by e-mail

    Hello!

    I have to scratch my head with this problem for a while: I have this form must be sent by email with some locked fields (read-only).

    What I do is affecting this BEFORE as I have the e-mail form:

    fieldName.access = "readOnly";

    app.execMenuItem ("SaveAs");

    However, the form always happens at destination with the field unlocked and ready for editing.

    Am I missing something?

    Thank you for all the ideas!

    Marcos


    Hi Marcos,

    Just check first that the changes script preserve is set to automatic.

    Then, make sure that the script has completely executed before e-mail script. It might help to put the script to access the mouseUp event that fires before the click event (containing the saveAs script).

    I then test this separate for the mail script and see it works on the local PC.

    Hope that helps,

    Niall

  • PDF form - instructions from input field

    I need to put instructions in an input field which disappear when the user clicks on the field.

    I read a response that provided a custom Format for this script. However, the person does not specify where the entry script. In the text field properties? Under Actions? The format? Validate? Any help will be greatly appreciated.

    Thank you.

    The custom format script would be placed under Format.

  • A PDF can setup to control shared using JavaScript?

    Hi, I have a bunch of documents that I need the installation of shared control. Is there a way to do it with a batch processing; for example, Acrobat JavaScript? Thank you very much. -Rick

    Hi Sarah, thanks for the suggestion. It seems that the answer is no.-Rick

  • How can I get a php login form to validate data by using my backend analysis?

    I do my first app, and I would like to use Parse as my backend. I found a bunch of tutorials illustrating the use of MySQL, but is it possible to use the analysis as the database?

    Did you read The Documentation Parse? Otherwise you should consider your question in the forum analysisanalysis.

    best,

    Shocker

  • Test for the day of the week, using javascript?

    Is it possible to test for what day of the week has been selected in a Date field using javascript?

    I have a script that checks if an option button 'Day' is checked and if so throws an error if the input time is not between 06:00 and 15:30. I need to change the hours between 06:00 and 14:30, but only if the day of the week is a Friday (selected in the field 'Date').

    Any ideas would be really appreciated.

    If

    (TimeReceived.isNull == true()

    {

    xfa.host.messageBox ("Please enter a time received");

    TimeReceived.rawValue

    = null;

    xfa.host.setFocus ("TimeReceived");

    }

    else If ((TimeofCall.Day.rawValue ==0))

    {

              if (TimeReceived.rawValue.search(":") > 0)

                        val1 = TimeReceived.rawValue.replace (":", "");

    on the other

                        val1 = TimeReceived.rawValue;

              if (val1 < 600 || val1 > 1530)

    {

    xfa.host.messageBox ("If 'Airtime' has selected day, the"received time"must be included in the normal working hours (06:00 to 15:30).") Make sure that you use military time, please re-enter. ») ;

    TimeReceived.rawValue

    = null;

    xfa.host.setFocus ("TimeReceived");
    }
    }

    FormCalc has a date function to obtain the day of the week.

    Form1.Page1.Subform1.DayOfWeek::calculate - (FormCalc, client)

    date_ var = Date2Num(date.formattedValue,"MM/DD/YYYY")
    $ = Num2Date (date_, "EEE")

    The "EEE" model returns MON, Mar, sea, etcetera. You must synchronize the date pattern on the DateTimeField ('date' in my case) with the script.

    "dayOfTheWeek" could be a hidden field and you can reference the 'dayOfTheWeek.rawValue' of your JavaScript.

    Steve

Maybe you are looking for

  • flickering screen

    Hello I have a hp dv 3 z 1000 cto entertainment pc and the screen still flashes.   I called microsoft, but they told me that it's a hardware problem.  Can someone give me advice how can I solve this problem?

  • Problems syncing with GPIB Read on a SR400

    I'm using LabView to control a meter of photons SR400 of Stanford research systems. Can control the box easily, I'm having problems with reading the correct data in the box of. I get incorrect values of 0 ', 6 and 134' rather than real account number

  • EA3500 FW downgrade problem

    Hello I hated manage my router via CCC extremely slow, so I decided to downgrade the firmware. The downgrade was not successful and the router is now useless, does not. I mean the lights are on and everything, but I cannot connect to it via 192.168.1

  • I have a hp pavilion a6325 and my graphics card is fried what graphics card is compatible

    I have a hp pavilion a6325 and my graphics card is fried what graphics card is compatible? the old card is a nvidea geforce8500gt but these seem difficult to obtain now. If I wanted to update that is not compatible. C.P. specification is as follows.

  • Problem reinstalling windows 7 with error message

    Hello I had some problems with my computer lately and decided to reinstal windows 7. so I put the cd in and reset and let it boot up to the windows install screen I press 'install' and I get an error message saying to appear... "no pilot of the plane