Seeking Pdf form help - javascript formula to auto-populate fields based on data from other fields.

Hi there, I am new to PDF form work, and am wondering if someone could help me with a javascript formula.
I want to auto-populate the EXPIRYDATE field, as the same date as the entered AUTHORIZATIONDATE field, but 4 years later.
So, I want to be able to enter 11/14/2014 in the AUTHORIZATIONDATE date, and have 11/14/2018 auto populate in the EXPIRYDATE field.
Seems simple I know, but I've messed around quite a bit and can't seem to make it work. Is this possible??
Any help would be very much appreciated!!

And what have you done?
This can only be done with custom JavaScript programing.
The value of date type fields are text field and not numeric data. The first task is to convert the dates to a number on some type of number sequence that is a mapping to dates.
Have you looked at the Acrobat JavaScript API Reference, the MDN JavaScript reference?
I would use the Acrobat JavaScript util.scand to covert the date string to the number of milliseconds from January 1, 1970 midnight. and then use the getFullYear method of the date object for the year value and add 4 years to that value and then use the setFullYear method to set the year for the date object. Now you can use the util.printd method to format the date object as a date string with a specific format.
// get the date value, format of date string and years to add;
var cDate = "11/14/2014"; // date value;
var cFormat = "mm/dd/yyyy"; // date format;
var nYears = 4; // years to add;
// convert date string to date object;
var oDate = util.scand(cFormat, cDate);
if(oDate == null) {
app.alert("Error converting " + cDate + " using format " + cFormat, 0, 1);
// add years to date object;
oDate.setFullYear(oDate.getFullYear() + nYears);
// display result;
var cExpireyDate = util.printd(cFormat, oDate);
app.alert("Authorization Date: " + cDate + "." +
"\nExpire Date: " + cExpireyDate, 3, 0);

Similar Messages

  • Auto Email notification based on data from Table

    I need to send a auto email notification based on the information updated on the table. Like when response table is updated as 90 for ( column users).A Email should automatically trigger to the different users listed in a table named (email).. I have stored the value of users in a table named response and the person to whom i need to be email has been stored in table name email.
    I'm using Oracle 10g Express edition
    Let me know how this can be done automically.

    Wrong forum...should be over in the Database Forum or PLSQL forum. You need to add a trigger to the table and the trigger needs to utilize the UTL_MAIL or UTL_SMTP packages. You can get more info on UTL_MAIL here or more info on UTL_SMTP here
    and here is some example code for a trigger:
    create or replace trigger my_trigger
    after insert or update
    on my_table
    for each row
      begin
       utl_mail.send(sender     => '[email protected]',
                     recipients => '[email protected],[email protected]',
                     cc         => '[email protected]',
                     bcc        => '[email protected]',
                     subject    => 'utl_mail test',
                     message    => 'if you get this message it worked!');
    end my_trigger;UTL_MAIL and UTL_SMTP may need some configuring before you use them, see the links above for details.

  • How to seperate current page fields in a pdf form using javascript

    Hi,
    Is that possible to seperate current page fields(textbox, Chesckbox) in a pdf form using javascript.
    I have coding to get all the fields in a pdf form. But i want to take CURRENT PAGE alone.
    Please help me out.
    Thanks and regards,
    Christy

    Hi try67,
    Thanks for your support.
    I got the result.
    Thanks and Regards,
    Christy

  • I have a acrobat reader, can I import text delimited data format to a PDF Form so that it can auto fill into forms that was created? If not, what about FDF and XML data

    I have a acrobat reader, can I import text delimited data format to a PDF Form so that it can auto fill into forms that was created? If not, what about FDF and XML data

    Yes, you can do all of that via Tools - Forms - More Form Options - Import Data, if you have Acrobat.
    If you only have the free Reader then you can still do it, but it requires a script.

  • I created a pdf form from a Word doc with 9 pt aerial font formatting; the text on the pdf form is aerial 9 pt, but the fields are formatted in courier 12 pt - How do I reformat the font in the fields??

    I created a pdf form from a Word doc with 9 pt aerial font formatting; the text on the pdf form is aerial 9 pt, but the fields are formatted in courier 12 pt - How do I reformat the font in the fields??

    You can set up a temporary button (or link, bookmark, etc.) and add the following JavaScript action:
    // Mouse Up script for a temporary button (or bookmark, etc.)
    // Change the font and font size for all text fields in this document
    for (var i = 0; i < numFields; i += 1) {
        var f = getField(getNthFieldName(i));
        if (f.type === "text") {
            f.textFont = font.Helv;
            f.textSize = 9;
    It also sets the font size, but you can remove that line if you don't need to do that.

  • Is there a way to auto-populate text based on a selection?

    I honestly don't even know how to word my question haha... so the title may be misleading...
    For my job I need to fill out indesign files, and at one part of the file based on the state a person is from I need to paste a specific e-mail in several places.
    Is there a way where maybe I create a dropdown menu of the several state e-mails I can choose from, and upon choosing it auto-populates that choice into the several other places?
    I guess, is there a way where if I make a select or input text into one area it will generate in the other areas as well?

    Maybe you need some kind of clipboard manager to choose several texts to paste
    http://lifehacker.com/5298615/five-best-clipboard-managers

  • I want to delete my data from iphone while i doesnot have the access but i know my apple id so plz help me its urgent, i want to delete my data from iphone while i doesnot have the access but i know my apple id so plz help me its urgent

    i want to delete my data from iphone while i doesnot have the access but i know my apple id so plz help me its urgent, i want to delete my data from iphone while i doesnot have the access but i know my apple id so plz help me its urgent

    Welcome to the Apple Community.
    You can only wipe your device when it is logged into iCloud and 'Find My Phone' is enabled, additionally the device will need to be switched on and connected to a wifi or cellular network.
    Unfortunately, you cannot activate iCloud or 'Find My Phone' remotely.

  • Can I auto-populate fields in a pdf form based on responses in other fields (using Acrobat XI PRO)?

    I am creating a fillable pdf form using Acrobat XI Pro and would like to be able to auto-populate text fields in one section of the form based on responses entered by respondents in an earlier section.  Is this possible?  If so, would it function for respondents using Adobe Reader to complete the form?
    Many thanks,
    Andy

    Thanks, George!  In the form I am creating, I ask respondents to identify a number of organizations that they work with.  For example, I ask "Please list up to ten organizations" and then I provide ten text boxes for organizations 1-10.  I then ask a series of follow up questions (radio buttons, check boxes, and rating scales) about each organization.  I would like to auto-populate the fields of those follow up questions with the names of the organizations that the respondents had written.  Does that make sense?  Will this require JavaScript?  My hope is to avoid complicated scripts that may give respondents technical problems with the form.  Thanks again,
    Andy

  • How to set a pop up calendar control in pdf  form using javascript?

    I'd like to add a pop up calendar control in a PDF form using Adobe Javascript.
    The user should be able to select a date from the calendar control.
    Awaiting a solution at  the earliest.

    Let's say I did provide you with a solution... Wouldn't that be a "third-party solution" as well?
    These tools are not compiled, you know. You have direct access to their source-code and can make sure they don't do anything else beside what they're supposed to do.

  • Is there any way to add a text from html into a PDF form using javascript?

    I have a SCORM based package having only a PDF form to show. I want to add user name from SCORM LMS to be added on the PDF whenever user launches PDF from LMS.
    Please let me know if there is any way to execute this.
    Thanx.

    Hi, hbirkie, and welcome to Apple Discussions. No, there isn't any way to apply text to a photo in iPhoto — you have to do that in a different application. MS Word is the last one I would ever have thought of using for that purpose, but if it works for you, great!

  • Pdf forms Help!

    1) Is possible to send pdf forms by email using Submit button, with other 3rd parties readers, or does it only work with adobe acrobat reader ?
    2) It is possible to storage data in the form using 3rd parties readers ? (save the pdf again with the data inside)
    Thanks

    >Maybe with some readers is possible ?
    Yes. It depends on the reader. Most will work to some extent.Others may have problems (like calculating form fields for instance).

  • How do I save IRS pdf forms so that I can fill in and save the data

    when I downlaod a US government IRS form I am unable to fill in the form, save the data and print, I have tried saving as a pdf from the print menu and using the tools menu none of which works

    I know there is an app called PDFPen that is supposed to fill in PDF forms.  PDFPen is available in the App Store, but it is not free.
    I have no financial interest in PDFPen.  I also don't know if there is some cheaper way to fill in the forms.

  • How to save to PDF form View Responses tab without including blank fields?

    Is there a way to save in PDF form from View Responses withouth including blank fields? More specifically, my form has several fields that have action (Show/hide) depending on the values. Once form is submitted and I am reviewing it from View Response tab, I use "save as PDF" button to save/download my completed form, however when I open it, it shows blank fields as well. Is there a way to somehow specify not to include blanks. If there is no way it would be a nice feature to have. Please let me know.

    No, the PDF is always going to show all fields, the "Show/Hide" does not affect the PDF we generate.
    I will soon post a Form for users to submit feature requests, keep your eyes out for an announcement in the forums for it and you can submit this request.
    Thanks,
    Josh

  • Auto-populate fields in Custom Object Based on Another Record

    Hello,
    I am hoping to auto-populate a few default values in a new Custom Object record based on an associated Lead record. The layout is this:
    I use the Lead record to take care of most of the information in the sales stages until the product is sold. The Lead record has fields to record information for a one product sale. The sales person can then use the Custom Object (called 'GX Additional Product') (which shows up in the Related Information section of the Lead record) to add additional items to a sales order request. Many of the fields in the GX Additional Product (custom object) record are identical to fields already filled out in the Lead record.
    What I would like to do, is when a new GX Additional Product (custom object) is added to the Lead record, those identical fields already filled out in the Lead record, by default, populate the corresponding fields in the new GX Additional Product (custom object) record.
    Is this possible? Is this something that can be done with JoinFieldValues? If so, I've had a bit of confusion trying to set up a JoinFieldValues expression.
    If you have any information to share that would be helpful, that would be greatly appreciated! THANKS!

    Hi,
    You can use JoinFieldValue to Custom Objects from other entities, cause you will have other objects' ID recorded inside the CO's, when you open a new detail record associated with the parent. Make sure your custom object is showing as a detail section (N:1) into lead´s main page. Try with one field first, using the exact syntax provided at samples listed at product documentation.
    regards,
    Flavio Amorim
    Brazil
    www.triscal.com.br

  • I want to create a form that as you add the numbers it adds the data from different fields...

    I would like to create a form similar to a shopping bag where you can enter amount and unit price and it would grab the multiplied total, then it would add the sum of all in a totals section...

    Sorry FormsCentral doesn't support calculations on online forms. You could achieve something like that with a PDF form (with the logic you need in it) and then import this PDF in FormsCentral.
    If you use the PayPal integration with the online form then paypal will show the total.
    Gen

Maybe you are looking for

  • Sender Filename in BPM

    Hello I am trying to bring in the senderu2019s file name into the mapping with the help of several posts in the forum. But all my mappings are inside the BPM and so the file name in dynamic config is lost when it comes into the BPM. Do I need to stor

  • Vendor Open item issue - Functional area wise

    Hi Gurus, We want to create Vendor Open item report using SQVI / report painter - Functional area wise, we are creating the report using BSIK table, but it is showing the credit amount coming as +ve.  We are not able extract the net amount, as it is

  • Report not working from forms.

    Hi we are beginners and please help us.we have installed in LAN database 11g on vista and application server 10g on os 2003. we are developing some applications from our developer pc in vista and using developer suite 10g. we want to generate some re

  • My iphone no longer displays anything through the HDMI connector

    I purchased a cheap 30-pin to HDMI connector (big mistake) but was able to see my iPhone screen on my TV.  I then added a Lightening to 30-pin connector so I could display my girlfriend's iPhone 5C screen on the TV.  But I had problem taking these tw

  • Purchase Requisition Against Sales Order Required Flow

    Dear All, I want to create Purchase Requisition against the Sales order user Defined committed quantity (i.e in Mtr) and on the basis of Purchase requisition i want to create Purchase Order. Here the Purchase order is standalone or we can take the re