Acrobat Form Fill – Document Closing Validation

Can someone help me with this. I want to set a form field empty validation in set document actions when a document closes. Basically wanting some entry level custom data validation.
For example Form has 20 fields, I want 3 of them say name1, occupation1 and age1 to produce a JavaScript alert if they are empty.
So if all three are empty it will say
Please complete Name, occupation and age fields
If only name is empty it will then only say
Please complete name field
Can someone point me to or list the javascript code on how to do this? At the moment I am just using a general app.alert type reminder when the document closes.Trying to smarten things up a bit.

I see. You can use this code, then. I made a slight change to the format of the error message to make it easier to generate:
var fields = ["name1", "occupation1", "age1"]; // The actual field names
var descriptions = ["Name", "Occupation", "Age"]; // The user-friendly names for these fields
var missingFields = [];
for (var i in fields) {
    if (this.getField(fields[i]).valueAsString=="") {
        missingFields.push(descriptions[i]);
if (missingFields.length!=0) {
    app.alert("Please complete the following fields: " + missingFields.join(", "), 1);

Similar Messages

  • Acrobat Form Fill Fields - Can you specify a font?

    I am using the new feature of InDesign CS6 that allows creation of form fields for PDFs. After exporting the page to PDF via the interactive setup dialog [command+E 'Adobe PDF (interactive)] I'll inspect the finished PDF in Acrobat 9. Everything looks as it should, except that when I type in some sample text in a text field, it uses Times Roman as the font. I would like it to use Arial regular.
    I can't find any way to specify a font for these form fields in InDesign CS6. This particular project involves quite a large number of files - so I'd rather avoid a process that requires me to go in to Acrobat and 'tweak' each PDF, changing the font in the properties dialog of each field to the Arial.
    Is there a way to set the font of a form field directly in InDesign? I've looked around and can't find a menu or dialog that addresses this.
    Thanks in advance for any help.

    You can edit the typeface used in your text fields in Adobe Acrobat Pro. Create your form with all the appropriate text fields you would like in InDesign CS6 then:
    export your form from InDesign CS6 as an interactive PDF
    open your file in Adobe Acrobat Pro
    Click "TOOLS" on the right hand side (next to sign and comment)
    Click "INTERACTIVE OBJECTS"
    Click "SELECT OBJECT"
    Then select all or any text fields you would like to changeif selected the text field should appear blue, not red, as well as displaying the description (if you assigned one while creating your form in InDesign)
    Once selected RIGHT CICK (if using a MAC or mouse without a right click button press crtl + click your mouse)
    a pop-up should appear and the at the top of the list you will see PROPERTIES
    click properties and go to APPEARANCE
    under the TEXT section you will see options to alter your text fields designated typeface, color and size
    NOTE: I believe if the user filling out the form does not have the typeface you assigned to the text field(s) it will default to New Times Roman

  • Simple Q. how to store/publish acrobat form and "return" as email attachment

    New to acrobat.com and wondering if this can be done (with acrobat.com).
    I have roughly 20 acrobat forms that I want to be accessible on the internet for about 5 specific people to access via the internet. The goal would be for them to click on the acrobat form, fill it out and then "return" it to me as an email attachment. The forms are not complex or long, typically 5 questions to respond to.
    So, I signed up for the free buzz option, uploaded a pdf form and saved it in a shared workspace. I see the file (test.pdf) in the all files section. The downward-pointing triangular arrow next to the file gives me the option of open vs download vs share among other choices. I really just want to open, but when I try that it says"this file is a pdf form. Please download the file and use adobe reader to fill out the form and submit your responses". I then click download it then asks for a location (this will be a problem-source of confusion). I save it to a location but that location already has that file and wants to  overwrite it-another problem. I quickly see that this is the wrong solution for me.
    So, can this be done with acrobat.com or should I be using something like dreamweaver and a personal web site? Thanks in advance.

    Hello there,
    Thank you for your post. What you would like to do is most easily achieved using Acrobat desktop software; this is a well-defined workflow, using Acrobat.com to distribute forms and collect responses, and deliver these responses to the Acrobat Tracker, where you can then analyze them and sort the data. If you're on a Windows machine, I recommend downloading a free 30-day trial of Acrobat Pro software, which you can get here:
    http://www.adobe.com/products/acrobatpro/tryout.html
    (Unfortunately, there is no trial available for Mac at this time.)
    Beyond that, there really isn't a more streamlined way to collect form responses with Acrobat.com; the Acrobat workflow works very well, however, and I encourage you to give it a shot. Here's a video that illustrates how it works:
    http://www.adobe.com/designcenter/video_workshop/?id=vid0348
    Please let me know if you have any further questions about Acrobat.com, and I will be happy to answer them for you.
    Best regards,
    Rebecca

  • Form Fill Conversion

    I need an easy program that I can transfer a PDF or Word document to a form fill document.
    I needs to convert the whole document at one time.I dont want to have to do it line by line.
    I also need to be able to save and beable to edit or continue working on the document.
    I dont want an extensive program.
    I currently have Adobe Export PDF.
    Thank you

    Converting forms is an absolute non-starter. The layout will change and official forms will be rejected or worse (working with converted government forms may breach rules & regulations). Work only in PDF.

  • How can I make PDF forms filled in Preview show correctly in Acrobat?

    Dears list members, there is a known issue with PDF forms filled in Preview: the fields do not show properly in Adobe Acrobat. How can this issue be solved? On the internet, I found two basic solutions: (a) to flatten the document by printing it as a PDF and (b) to use a costum-made script. Is there an official correction for this bug that does not involve installing suspicious scripts? Thanks!

    Information only - No one was successful in this discussion.
    https://discussions.apple.com/message/21453922#21453922

  • Acrobat X Form Filler

    In using form filler is there a way I can make a universal change to the font and have all fonts at Times Roman 11 pt? Can I use a carriage return to widen the box?  Is form filler available on Acrobat 9? 

    OK, let's try to get some terminology fixed. You have a document that you have created as a PDF that looks like a form (it is not a form in the PDF sense). You are now trying to create form fields that can be filled in that gives you a form PDF. The first question is which product are you using to create the form, Acrobat or Designer? If you do not get transferred to Designer from Acrobat and get a forms tool in Acrobat you are creating an AcroForm.
    You can right click on a text field and select to edit the properites. It is common to leave the text to be automatic in size. However, you can set the font if you wish. I think you can select several fields and do the property change to all at the same time, but am not sure. Instructions for forms are in the manual (see the help menu). There are also license restrictions for allowing saving of the form for Reader and also considerations for using e-mail submission of the form data (both does the Reader and e-mail of a user communicate properly and be careful about private datta being sent by e-mail). Good luck.

  • Acrobat XI Pro will not activate when trying to convert to an Acrobat form from an existing Word document

    My version of  Acrobat XI Pro will not activate when trying to convert to an Acrobat form from an existing Word document.  Acrobat not responding.
    Please advise
    John B

    Hi johnb69345359,
    I am sorry for the inconvenience caused. Lets try to resolve this issue.
    I would require few details in order to diagnose the issue correctly :-
    1) Are you able to launch Acrobat XI pro ?
    If yes, please try Help -> Repair option to repair Acrobat XI pro. Then try to perform the covert operation.
    2) Let me know the Operating system installed on your computer.
    3) Is there any error code or error message?
    Regards,
    Aadesh

  • Acrobat X Pro crashes when document closed if launched from COM API

    Environment: Windows 7
    Acrobat X Pro
    I'm seeing some unusual behaviour when running the following code which simply launches the Acrobat Application and opens up a document with Acrobat X Pro.  Closing the document causes the program to become unresponsive and then crash.  The crash dump shows the exception as "The thread tried to read from or write to a virtual address for which it does not have the appropriate access".
    I've discounted a problem with the plugin I wrote since the program also crashes without the plugin loaded. 
    Same code runs fine with Acrobat 9 using the version 9 acrobat.tlb.
    Can anyone help or advise?
    With thanks,
    Evan
    HRESULT hr = E_FAIL;
    VARIANT_BOOL bRet;
      try
    ::CoInitialize(0);
    CComPtr<Adobe10::Acrobat::CAcroApp> pApp;
    CComPtr<Adobe10::Acrobat::CAcroPDDoc> pDoc;
    CComPtr<Adobe10::Acrobat::CAcroAVDoc> pAVDoc;
    CComPtr<IDispatch> pDisp;
    CComPtr<IUnknown> pUnk;
    CComPtr<IUnknown> pUnk_App;
      if (SUCCEEDED(hr = ::CoCreateInstance(__uuidof(Adobe10::Acrobat::AcroApp), 0, CLSCTX_ALL, IID_IUnknown, (void**)&pUnk_App))){
    hr = OleRun(pUnk_App);
    if (SUCCEEDED(hr)){
    hr = pUnk_App->QueryInterface(&pApp);
    if (SUCCEEDED(hr)){
    pApp->Show(&bRet);
    else
      return hr;}
    if (SUCCEEDED(hr = ::CoCreateInstance(__uuidof(Adobe10::Acrobat::AcroPDDoc), 0, CLSCTX_ALL, IID_IUnknown, (void**)&pUnk))){
    hr = OleRun(pUnk);
    if (SUCCEEDED(hr)){
    hr = pUnk->QueryInterface(&pDoc);
    if (SUCCEEDED(hr)){
    hr = pDoc->Open((BSTR)CComBSTR(strPath), &bRet);
    if (bReadOnly == VARIANT_TRUE){
    pDoc->SetInfo((BSTR)CComBSTR( 
    "ReadOnly"), (BSTR)CComBSTR("yes"), &bRet);}
    hr = pDoc->OpenAVDoc((BSTR)CComBSTR(strPath), &pDisp);
    if (SUCCEEDED(hr)){
    HWND hwnd= ::FindWindowW(_T( 
    "AcrobatSDIWindow"), NULL);  
    if (hwnd)ForceForegroundWindow(hwnd);
    catch(const std::wstring& s){
    EC_TRACE(LVL_ERROR, s.c_str());
    if (hr == S_OK)hr = E_FAIL;
    return hr;

    Problem solved. Evidently, the lead document in the file was corrupt. I recreated the file and it compressed without any problems.

  • Acrobat 6 filled form fields show up empty in Acrobat X

    I've been using Acrobat 6 to create fillable forms some time back and now I'm having some issues trying to correct some fields they are showing up empty in Acrobat X. Is there a way to still view or edit my saved Acrobat 6 filled forms in Acrobat X?
    Any help would be appreciated

    Hi,
    Would you take a look at Darrell's reply #4 in the following discussion to see if it answers your question?
    Re: Utilizing Adobe Reader version 11.6.3 in Ipad running IoS 8.1
    Thank you.

  • Using "calculate" in Acrobat Form to display document metadata (Author, etc.)

    Can someone assist with a javascript that will retrieve the document "Subject" or "author" so that I can use that data on an acrobat form?  (I am creating a form that will then be inserted as the first page in an existin adobe document and I want the form to display details about that document.

    You probably don't want to use the calculate event, as it is triggered only when a field value changes. You can place someting like the following in the initial page's Page Open event:
    getField("SUBJECT").value = info.Subject;
    For more information, see: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.396.html

  • Multiple form fill-ed's open at one time - crashing

    I have many form fill-ed documents created using Live Cycle.   Issues have been reported regarding adobe shutting down in the middle of filling out a form.  Tow of our employees have this crashing issue.  They both have Windows 7; Adobe Reader XI, and IE X.  I have trouble shooted several different options.  I have used the acrobat_ittools_cleaner to remove old acrobat (recommended by acrobat). 
    I had the Two employees use one form fill at a time to determine the cause of the crashing.  If they use only ONE form at a time, there is not crashing.  The minute they open two forms, and start to fill in the form, it crashes. 
    These forms are not new,  They worked fine with mulitple forms open in the past.  I created these forms in Live Cycle (which came with Acrobat Pro 9).  I figured with the added security in Acrobat XI, I needed to update the forms using Live Cycle Designer ES4.  That did not help either.
    What else can I do to correct this problem?    

    Maggie,
    There are some things you need to consider:
    &lt;script language="JavaScript" type="text/javascript">
    function f_mass_update()
    var counter = 0;
    for (var i = 0; i &lt; document.wwv_flow.f03.length; i++)
    {var curr_id = document.wwv_flow.f03.id;
    if ($x(curr_id).value == 'COMPLETE')
    {$x(curr_id).value = 'CANCELED';
    $x(curr_id).style.color = "darkred";
    $x(curr_id).style.fontWeight = "bold";
    $x(curr_id).style.background = "yellow";
    $x(curr_id).style.width = "103px";
    counter = counter + 1;}}
    if (counter == 0)
    {alert ('There are no more statuses to change!');}
    else {alert(counter + ' Records updated!');}
    &lt;/script>is the correct script if you escape COMPLETE as 'COMPLETE' and CANCELED as 'CANCELED'. The same rules apply for javascript as for the most other programming languagas - numbers do not need to be escaped but character strings do.
    The second thing is the question of your tabular form id. In my case it was f03 but in your case it is probably different. If you created a wizard tabular form and didn't touch it, you could count the columns.
    If your column is the first editable column than it will be f03. The second will be f04 and so on. My recomendation is to use Firefox and download the extension Firebug. With firebug you can do HTML > Inspect and go with the mouse over any element on your page. Click on the actual tabular form cell and it will show you some code like this:
    &lt;input type="text" id="f03_0001" value="10" maxlength="2000" size="16" name="f03"/>so, the name of the element is f03.
    See the same page, now with an image attached of what I just explained:
    http://apex.oracle.com/pls/otn/f?p=31517:213
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How do I clear a form text field during validation using JavaScript?

    I am just learning JavaScript and the Acrobat API.  I have a form created in adobe acrobat 9 standard (starting from an existing form in MS Excel).  There is a text field for a Social Security Number.  I have a custom format script and keystroke script and a custom validation script. I would like to add to the existing validation script, that if what is entered doesn't match the validation test, then clear out the field as in erase all the characters that were typed into the field.  I want this to happen no matter what.  So even if someone filled in a valid SSN number and then moved to the next field, but then went back to the SSN field and decided to change their entry and this new entry was "invalid" then clear out the field (do not revert to what was typed in the field originally, even though it was considered valid by the script).  (There is currently no default value for this field.)  Thank you inadvance for you help on this.
    Here is the current validation script:
    // only run when field not blank
    if (event.value != "")
    // RegExp for validation #########
    var re = /^(\d{3})(\d{2})(\d{4})$/
    if(re.test(event.value) == false)
    app.alert("Enter a 9-digit Social Security number with no spaces or special characters (e.g., 555555555). It will be converted to the format 555-55-5555.")
         //Here is where I've tried adding all of these lines, but none of them will clear out what is in the field
              //this.resetForm([event.target.name]);
              //event.target.value == "";
              //getField("SSN 1").value = getField("SSN 1").defaultValue;
              //getField("SSN 1").value == "";
              //event.rc = false;
    And incase these are somehow affecting it, here are the other scripts being processed on this field:
    Keystroke script:
    var input=event.value;
    var chars=input.length;
    if( event.willCommit || chars==8 )this.getField("Name 1").setFocus();
    Format script:
    var re = /^(\d{3})(\d{2})(\d{4})$/
    if(re.test(event.value) == true)
    // add "-"
    event.value = RegExp.$1 + "-" + RegExp.$2 + "-" + RegExp.$3;

    Thank you very much.  I did try that before, but I was using event.value == "";  I guess in this case I'm assigning the value of "", not making the value equal "".

  • Invisible text in acrobat forms

    For a number of years and a number of different versions of Acrobat we have noted that a form filled out across platforms may not show the filled in text unless it is highlighted.  I've searched Google and the Adobe site and found a number of discussions on this and some "fixes". 
    We've been dealing with this for a number of years and have noted that the issue is with the default text color, black.  If you actually chose any other color (we usually use dark blue) when creating the fields the text will appear on all platforms and almost all viewers.  You can also "fix" filled out forms that have the invisible ink issue by using the advanced editing tools to highlight a field and then select all and then adjust properties to change the text color to anything but black (or white).
    We have noted a correlation in the issue seeming to be when the form was created on one platform and then filled out on the other, aka Mac created but Windows filled out or vice versa. Ocassionally it will show up within a family (aka Windows) but where the base OS (XP vrs 7) or version of Acrobat (7 vrs X) is different from the one that originated the form.
    Is there some other global setting that needs to be or possible can be adjusted to fix this?

    Invisible text in Flash enabled web pages is a frustrating problem that is affecting Mac Users who play Farm Town (8.5+ million people on FaceBook) and probably many other games too.  See this forum as an example of the problem:  http://slashkey.com/forum/showthread.php?p=2531318
    Before even reading this forum I did everything that appears here with no success and then everything listed in the referenced forum (above) with no success... but the following did fix the invisible text problem and I hope that it will help others too.
    1.  Drag the Font folder from the User directory to the trash  ie. ~/Library/Fonts.  (where ~ is = your User Account Name.)
         Be careful; this is NOT the Font folder in the main library.
    2. Download Font Finagler v1.5 beta for Mac OS 6, and clean the font cashe files following the instructions for this free shareware app.
            http://homepage.mac.com/mdouma46/fontfinagler/
    3. Open the Font Book app which is a new app that is included with the Mac OS Snow Leopard (10.6). (Font Book is in the Applications folder.) Read the Help info for this app and then: Choose "All Fonts" in the left column and then choose "Select Duplicate Fonts" from the Edit menu. Disable or delete all duplicate fonts that this process identifies. After dealing with the duplicate fonts, select "All Fonts" again in the left column and choose "Validate Fonts" from the File Menu.  Deal with the results that it will display using the help file for guidance.  Interestingly, in my case there were no corrupt fonts in my Mac system, but the validation process identified more duplicate fonts that the previous step did not find. Again deal with the findings and disable or delete the duplicate fonts.
    4. Reboot your Mac and get on with using your Flash enabled web pages.  Duplicate fonts seems to be the problem that cause invisible text in Flash enabled web pages.
    Hope this helps you... it worked for me.
    Clark

  • MS Word 2007 form fill in

    I have a document in MS Word 2007 that is a fillable form.  I want to save it to Adobe Pro and retain the form fill in capabilities.  I just downloaded ADOBE Premier Pro.  I would like instructions on how to do this.  Thanks.

    I moved this thread to the Creating, Editing & Exporting PDFs forum.
    Depending on how the word document is formated I believe Adobe Acrobat Professional maybe able to detect it as a form.  You can try the trial at https://www.adobe.com/cfusion/tdrc/index.cfm?product=acrobat_pro&loc=en.  For more information on Adobe Acrobat Professional please see https://www.adobe.com/products/acrobat.html?promoid=JOLIR.

  • LiveCycle Designer Form Filling on Tablet PC with Stylus

    My org is developing a bunch of forms in LiveCycle Designer to be filled out on a tablet PC using its stylus pen.
    We are using LiveCycle Designer ES 8.2 on a Dell Latitude XT2 tablet. The form is to be viewed in Adobe Reader 9 (but could change that to Acrobat 9 if we had to). We have extended the rights to Adobe Reader to enable the user to fill out and save the form data as needed. The tablet is running Windows XP for Tablet PC.
    The form is working properly on the tablet PC but I can't fill in the form fields with the tablet's stylus. Using the keyboard we can key in the necessary data but one of the primary goals to implementing this solution was to increase mobility in the field and reduce paper usage.  I have tried using EverMap's AutoInk plug in as directed in this Adobe blog (http://blogs.adobe.com/acrolaw/2009/01/using_the_tablet_pc_with_acrobat.html) but it only works with forms created with the Acrobat Forms Wizard. We don't want to create the forms in here as it is too time-consuming to continue to update a Word template and run it through the wizard again.
    I also installed SigPlus Pro for Tablet PC and the Adobe 9 plug-ins created by Topaz Systems to allow for digitally signing the document with the customer's signature image. This piece is working very well.
    Does anyone have any tips on how to enable ink-to-text form filling on a Tablet PC for forms created in LiveCycle Designer? I am all out of ideas and can't find anyone else who has even run into this issue.
    PLEASE HELP!!
    Many thanks,
    FLO

    Hi,
    I don't have an answer for you about the tablet - sorry.
    But a few pointers.
    The AutoInk plugin seems to write "over" the PDF and is flattened as an annotation. The data is unlikely to be "inputted" into the field and therefore may not be recorded as data. You might want to try this out with a test AcroForm. This might be OK with you, as you just want to print out the completed form. If that is the case then you just need to enable the form for commenting.
    In relation to Acroforms, one thing to bear in mind. Once you have brought in the Word template into Acrobat for the first time and inserted all of the form objects that you want. Later if you want to update the form, then you don't need to start from scratch. Just replace the pages in Acrobat with the new ones! Acrobat will slide the new pages under your existing form objects. You may need to move these around or add new ones to suit the new layout - but by no means do you have to start from scratch.
    Sorry couldn't be more help - good luck,
    Niall

Maybe you are looking for

  • Itunes movie doesn't show up on Apple TV

    My movie shows up on itunes on my computer. I can play it and send it to view on Apple TV but it doesn't show up on Apple TV's menu and all the other movies on my iTunes do. Any thoughts? (I have checked different lists on Apple tv).

  • HT4972 How do you save your photos, Are they saved in the back up?

    So you know how when you plug in your apple device the tab for saving your pictures in a certain folder comes up, Well that thing doesnt show up and I dont know how else to save my photos. When you back up your device on itunes does all my photos in

  • Why is the audio input different on my new macbook air?

    I am trying to use a third-party headset with built in microphone.  The adapters that I bought were recommended to me by the Apple store; they work fine in older models but do not work in the new macbook air. Why on earth would that be? There is no w

  • How do i get i tunes support if i use it on windows? i cant seem to get help anywhere and i want my moneyn back!!!

    i have purchased a movie on itunes and keep getting an error - 41120 - and so i looked it up, found a link on deleting the sc folder and when i find thsi page on itunes there is nothing there. its as if its been deleted!! so i try to contact but it k

  • Calling Methods

    Hi All, Can anybody pls tell me how to call a method built using class builder.. se24.. in a program ? Like how we goto 'edit - > pattern - > and give the function module name in that' to call a fn module.... Waiting for the reply.. Thanks in advance