Create a dynamic dropdown field in Adobe Acrobat Pro XI

Hello all. I am trying to create a field in one of my forms using Adobe Acrobat Pro XI. I have a dropdown list of "main" items, and based on what is selected in that list, I want a second dropdown list to give different choices. I have searched and searched and have javascript that I thought might work, but maybe I am have a mistake or I am placing the javascript in the wrong place, becasue it is not working. I know very, very little about javascript, so any help would be so much appreciated.
I am using Adobe Acrobat Pro XI. I added a "new field", and selected "dropdown". The field name is ProvType. The dropdown options are:
     Inpatient
     Outpatient
     Physician
I have the "Commit selected value immediately" selected.The field is not validated. The format is "none." There are no actions or calculations associated with it.
I then created another dropbox, and named it SubProvType. Under Actions, I selected the trigger as Mouse Up, and then selected the Action "Run a JavaScript." I selected the add button, and typed this in the JavaScript editor:
switch (ProvType.rawValue)
    case "Inpatient":
        this.setItems("Hospice,Hospital,Nursing Facility");
        break;
    case "Outpatient":
        this.setItems("Adult Day Center,Home,Other");
        break;    
    case "Physician":
        this.setItems("Surgeon,Family Practice,Neurologist");
        break;    
What I want to happen is:
If "Inpatient" is selected, I want the following options to be available in the second dropdown box "SubProvType":
     Hospice
     Hospital
     Nursing Facility
If "Outpatient" is selected, I want the following options to be available in the second dropdown box "SubProvType":
     Adult Day Center
     Home
     Other
If "Physician" is selected, I want the following options to be available in the second dropdown box "SubProvType":
     Surgeon
     Family Practice
     Neurologist
However.... when I close the form editing and try to select a different option in the ProvType field, the SubProvType field remains blank and there are no options available. There are also no errors.
I must be missing something, but I have no idea where to start. Thank you in advance for any help anyone can provide.

dbettis2.... Please understand that everything I am about to tell you is ONLY thanks to the help I received from Gilad D. I don't know if this will help you or not, but I want to try and pass it forward.
If what you are looking to do is have two dropdown fields, and the second one (concentration) be a list determined by what was chosen in the first one (newMajor) then this will work, if you are using Adobe Acrobat Pro.
Create a dropdown field and name it newMajor. In the "options" tab. Make sure that you enter all of the items that you want in that list AND that they match the javascript (or this will not work.)
In this case, I believe you want the initial list to be:
- Select One -
BA - Communication (BACOMM)
BA - History (BAHIST)
BBA - Business Administration (BBA-BADM)
After you create the dropdown field and enter all of the options, go to the Validate tab, chose "run custom validation script", then copy and paste the following:
switch (event.value) {
    case "- Select One -":
        this.getField("Concentration").setItems(["-----"]);
        break;
    case "BA - Communication (BACOMM)":
        this.getField("Concentration").setItems(["- Select One -","None","Mass Communication (MCO1)","Theatre (THEA)","Communication Studies (MC02)"]);
        break;
    case "BA - History (BAHIST)":
        this.getField("Concentration").setItems(["- Select One -","None","Teacher Certification (HIS1)"]);
        break;
    case "BBA - Business Administration (BBA-BADM)":
        this.getField("Concentration").setItems(["- Select One -","None","Supply Chain Management (SCM)","Hospitality Management (HSMG)"]);
        break;
Then create a second dropdown field, and name it Concentration. Nothing further needs to be done with the second dropdown field (as far as entering options or any javascript.)
It should work. I have created a form using this code and field structure, and it is working. I hope this helps you, if in fact this is what you were trying to do. (I do not know how to attach a file to this post or I would send you the PDF that I made so you could see the fields. If you message me, I can send it to you.)

Similar Messages

  • Is it possible to create a editable pdf with validation(required field) using Adobe Acrobat pro version?

    Hi,
    the subject says it all. I have downloaded the trail version to see if its possible to create a editable pdf with validation(required field) using Adobe Acrobat pro version?
    Basically, I will have to create a pdf form where users fill it and send it back to me. there will be required fields (the textbox and check box) that user need to fill before saving the editable pdf?
    Is it possible. if so, can someone kind enough to point to me right directions?
    Thanks in advance.

    Thanks for reply. What I am trying to achieve is to give an option for the user to download the pdf form and once the user tries to save the pdf, it validates with the required field. I managed to create the editable pdf with required fields option. I just need that validation to be done when user click on save file. How can I achieve this? thanks so much for your help.

  • Creating a basic list portfolio in Adobe Acrobat Pro X 10.1.2 and higher

    All,
    I am trying to create a basic portfolio in Adobe Acrobate Pro X 10.1.2; however, I only have the following layouts available:
    Click-Through
    Freeform
    Grid
    Linear
    Wave
    None of these layouts seem practical.  I just need a standard list portfolio, similiar to the "list with file preview" layout available in Adobe Acrobat Pro 9.5.5.  Is there a similar list portfolio available in later versions of Adobe that I am just not aware about?  I really don't want to have go looking for a custom-portfolio to download.
    Thank you for your help.

    Hi,
    To be complete on this, first make sure JavaScript is enabled:
    Edit > Preferences, JavaScript category
    Check "Enable Acrobat JavaScript".
    To open the console, you can hit ctrl-J.
    -Or- to use a tool button to open the console, do the following:
    1. If Javascript is not listed in the Tools pane, show the JavaScript panel heading by selecting the following menu item:
        View > Tools > JavaScript
    2. Click the arrow on the JavaScript heading to show the tools beneath it.
    3. Click "JavaScript debugger". to show the JavaScript console/debugger.
    Regards,
    Charlene

  • Double entry in each field of Adobe Acrobat Pro

    I am using Adobe Acrobat Pro to complete a prepared form.  Upon entering data in to blank fields, I get a duplicate entry in each field box in a different font size when I tab or enter to the next field. I am sure it is a setting, any suggestions?

    Thank you George.
    After messing around a bit I was able to open in acrobat pro and remove the duplicate fields. Thank you for your help.
    Randy

  • Removing digital signatures created in a previous version of adobe acrobat pro

    I recently installed Adobe Acrobat X Pro, which required the removal of my previous version (8 Pro). I have several PDF docs created in (8 pro) with signature fields. I reuse these docs inputting updated info. When I do I clear the signature field, and place a new signature. After installed (X Pro) I can no longer clear the signature fields to place an updated signature. I am assuming that the new installation deleted my old signature ID that I created with (8 pro). Is there any way to clear my old signatures?

    I don't think it should have deleted the digital ID file, so if you can find it you should be able to add it in Acrobat. Seach you system for any .pfx files to see if you can find it. See this previous thread for some potentially helpful info: http://forums.adobe.com/thread/991314
    In the future, be sure to keep a backup of any digital ID files you have.

  • Format Date Form Field in Adobe Acrobat Pro

    Thanks in advance for your help. I have date fields in an Acrobat form. Is it possible to create a script to format a date as either MM/DD/YYYY or MM/DD/YY? In other words, if someone enters MM/DD/YYYY, the date would be accepted and MM/DD/YY would also be accepted. Thanks, again.

    Since the time measurement is based on a sattilite revolving around another object in space, much of the concepts and measurements apply to rocket science. But I do not know if all rocket scientist woudl get it. Wasn't there a sattilite that mixed miles and kilometers within the navigation program with a suprising result.
    One needs to get to a common unit and then just do the math.
    Actually JavaScript does have an adjustment for the Date.getYear if the date object is established with the 4 digit year.
    I had a recent issue at work. I work from the U.S and have to access data on a server in the UK using Remote Desktop and the remote deskto is configured for the UK date format unless the user changes it. In prior years the data was processed on servers in the U.S. with U.S. date format. There were many instances when the date and month were swithed and requires over a month to fix. Thank you Microsoft Certified Network Administrators.

  • CS4 Created Text Grainy When Converted to Adobe Acrobat Pro

    This is a beginner's question. In Photoshop CS4 I'm creating what I believe to be relatively high resolution text, 4000 pixels/inch. One of the fonts is not commonly installed on user PCs so I have to rasterize the text. I want the background to be transparent so I apparently have to save as a PNG image. I'm inserting this image into a PowerPoint slide then creating a PDF of this slide using Adobe Pro 9.
    Any suggestions?
    Thanks,
    AJ

    First of all, I have to eliminate printing to PDF, because it doesn't
    preserve my bookmarks, and that is not acceptible.
    I have disabled the Adobe COM plugin for Word 2007 and used Microsoft's
    built-in Save As PDF functionality, which results in the form data
    disappearing. I have enabled the Adobe COM plugin for Word 2007, and did a
    Save As Adobe PDF resulting in the same problem. I opened Adobe and created
    a PDF from the Word 2007 document, and the same issue occurs.

  • I created several pdfs & saved them in adobe acrobat pro.  I want to start all over & want to delete these pdfs so I am not confused with more than one document with similar titles.  How do I delete the document

    I am working on a big project & creating everything in word.  I then am turning the documents into PDF format so they will be easy for everyone to open.  I have several PDFs that are not the way I want them & want to delete them so I don't have so many documents with similar names.  Is there a way to delete a pdf from my saved document??  This is probably very simple & I am over thinking it, but appreciate any help.

    I was able to figure it out, & just as I thought way to simple!  UGH!

  • Why barcode works in Adobe Acrobat Pro but become "grey" in Adboe Reader ?

    I have created a form with barcode using Adobe Acrobat Pro with ONE field only and it works prefect. 
    However, the barcode area become grey if I using Adobe "Reader" to fill-in data!  I have tried to increase the size of the barcode area but still don't work.
    Can anyone help?
    Thanks,
    Danny

    Hi everyone,
    Any solution to this issue? Is there any cheap Adobe or third party component that enable us to design pdf forms with either livecycle designer or acrobat and provide dynamic barcode functionality for the end users having adobe reader?

  • Adobe Acrobat Pro (version 9 and X): creating limitations in a group of fields.

    Hello,
    I am building a fillable questionnaire form using Adobe Acrobat Pro 9 and X.
    Within 1 question, I want to set 3 fields, each representing an answer that can only be answered once.
    I know about Radio Buttons but, I need to have some text written instead of a checkbox.
    How to set a limit onto a field to direct person filling in the form to answer only 1 of the 3 fields within the same question?
    Please advise.
    Thanks,
    Win_win

    Thanks for your explaination although I am aware of both functions and thats why I chose one over the other.
    I can understand that with more experiences with scripts or the software, you can 'play' with the function much easier and better than I could as I'm quite junior to all of these. So I appreciate if you can bare with me as I try to explain what troubles I have and ways I had tried to solve them.
    The trouble I have, is Radio buttons have pre-set options and thus would not allow end user to write down their own value.  But what I need, is the value and the limitations that the end user could only choose 1 of the 3 options from a group. (Note that I am not using any scripts so I'm using the softwares' function as-is.)    In other words, if the group for 1 button has answers as A, B, or C.  I want to know  how much of A.   And not a pre-set value of A. If the end user chose A, then B and C would not be chosen.  As it's either the quantity of A, or B, or C.
    Also, what I did not understood from your message earlier today  was what is a 'nullstring' in a text field and how to create that?
    It seems from your response earlier that I could solve my problem with either Radiobuttons or, Checkboxes. 
    If I were to use checkboxes, then how can I 'add a control to make the text field read-only when one of the checkboxes has been selected' as you've suggested?
    Is one option better than another? At managing responses received?
    I will have to repeat this for quite an amount of questions I have for the form, so whichever that is easier to achieve and would produce minimum problems /errors, would be preferred.
    I hope I have explained myself clearly.

  • Issue attaching files in Adobe Reader from a form created in Adobe Acrobat Pro 9 Extended

    Hello all,
    I am having issues- big ones- please help!
    I have created a simple form in Adobe Acrobat Pro 9 extended version that will be made available in a local drive for our salesmen to open not online or in html format- fill in and send back to their manager and the factory- there are 2 e-mail submit buttons on this form and the user selects which one to send to.
    This form also has a button for save and for print. Everything works great except that the attach a file button I created. It works in Adobe Acrobat, but not in Reader. When you click the button in Reader it compresses but nothing happens.
    I have tried many different things- including extending the rights to adobe reader.
    Also, this form has a password protected security and I have given permission to print, to fill in the form and sign existing signature fields. When adding the security I made sure it said compatible with Adobe 3.0 and later versions.
    I know I have to do the security before I extend the rights to reader and not the other way around.
    Don't know what else to do.
    Any help would be appreciated!
    Thanks,
    A.

    I've attempted using Acrobat Pro to do the conversion, but it simply won't allow it.  Are there easier ways to have an online or fillable form, created in an Adobe program, such as LiveCycle or Acrobat Pro, sent or saved in a pdf format? 
    For example: I make a form using an Adobe Program and put it online for people to fill out.  They fill it out and click a button to email it to me.  When I open it, is there a way to see it as a PDF document?
    Thank you for your help thus far.  It has been much  more informative than many of the forums I've attempted to decipher.

  • I have developed a fillable form using Adobe Acrobat Pro. The form has several fields and some of the information is captured in a bar code. What programs must be used to open the form to properly fill the form out?  Adobe Reader, Adobe Xi, Ibook, etc.. I

    I have created a fillable form using Adobe Acrobat Pro that contains several data fields with some feeding data to a barcode in the document.  I have a "button" set up to save and send the completed form one it is completed.  Some of the user are having troubles filling out the form as they are using various programs to do such as iBook, Adobe Reader, etc....  Sometimes the information is not transferred to the barcode and sometimes the "submittal button" doesn't function properly.
    Please provide a solution or give me a list of the programs that must be used to properly open and fill out the form.
    Greatly appreciated.

    Best option is to use Adobe Reader (or Acrobat, of course) on a desktop computer (ie, not on a mobile device). Any other configuration is likely to be problematic.

  • How to create a pop up calendar in adobe acrobat or any other adobe tool  via adobe javascript  ?No third party tools needed(Eg:formrouter)

    I want to create a pop up calendar in adobe acrobat or any other adobe tool  via adobe javascript  in a PDF form .
    I wish to create the calendar without any third party tool.
    I found few options like formrouter and also pdf scripting.
    But I was to create the calendar via pure Adobe Javascript. If no such option is there  inbuilt pop up calendar control in any adobe tool to design the PDF form and afterwards save the same as PDF.

    All 3 of the options provide are all JavaScript. There is no plug-in used. You do need to place the JavaScript code text file into a special folder so that the menu and tool bar tools that allow execution of the JavaScript code and associate the pop-up calendar with a specific field.

  • How do I add a functional "submit button" to a pdf form in Adobe Acrobat Pro XI ? I created the pdf form in Adobe Forms Central.

    How do I add a functional "submit button" to a pdf form in Adobe Acrobat Pro XI ? I created the pdf form in Adobe Forms Central. It's for an online Diet Questionnaire. After people complete the form I'd like them to click "SUBMIT" and the completed form will be emailed to me.

    This can be a bit confusing because Acrobat 11 comes with the desktop app that allows you to create simple PDF forms without having a FormsCentral account. Some people find this helpful, but you need to understand that when you generate the PDF form, it is Reader-enabled by Acrobat. In order to edit the form further in Acrobat, you have to create a non-enabled copy of the form. You do this in Acrobat by opening the form and selecting: File > Save a Copy
    and opening the copy. It is not opened automatically.
    You can now add a button and set it up to submit by email, either using a "Submit a form" action or the submitForm JavaScript method. You can set it up to include just the form data or the entire PDF, and will want to use a mailto type URL. Submitting the form to the FormsCentral server has a number of important advantages over email (much more reliable, more secure, etc.), so you might want to consider it.
    If the form needs to be saved with Reader versions prior to 11, then you will need to Reader-enable the document. In Acrobat 11 you do this by selecting: File > Save As Other > Reader Extended PDF > Enable More Tools

  • I would like to create a plugin for adobe acrobat pro 9.0...

    I would like to create a plugin for adobe acrobat pro 9.0 in order to compare pages, delete the same pages and mark pages from first compared document with new and mark pages from second compared document with original. I downloaded the SDK for adobe 9.0 but now I am not sure how to continue? Do I need Visual Studio or can I use another program that is a freeware? What other program do you recommend?  How can I open an .api file in order to see the code? Do I need to place the SDK files in a specific place?

    1. You will need Visual Studio. Getting your first plug-in to compile can be an ordeal, be sure to use a sample project and work with it exactly.
    2. API files are the work of other programmers. You cannot look inside, and to try to do so is a breach of most software licenses.
    3. API files are installed to the Acrobat plug-ins folder.
    4. You will not find samples or code to copy/paste. You should be an experienced C/C++ programmer, you should be familiar with the basics of the PDF file format ISO 32000-1, and you should be prepared to read thousands of pages of documentation.

Maybe you are looking for