Expand my Community achievements bar.

LiveCycle Designer 8.0 Drop-down menu help - newbie

Avatar

Not applicable
I am new with LiveCycle and do not know much about coding and the like. I've search the forums and have not found quite what I need. (It might be because I don't know the correct terms to search - so I apologize in advance if there was a previous posting regarding this)



I am creating a form for lab tests for referring physicians to fill out.



for simplicity, I will just use the state, city example.



>>>>>> QUESTION 1.



I have dragged/dropped a drop-down menu icon onto the form, gone through the Palette>Object>Field>List Items to compile the list of states (in my real case, a list of lab tests)



How can I get the second drop down menu to show the corresponding cities based on the "state" selected in the first drop down menu? So that when I choose "California" I have the option in the second drop-down menu to choose from "Los Angeles," "Orange County," "Long Beach," etc



VERSUS



if I select "Texas" the list will retrieve "Houston," "Sugarland," "Dallas," etc.



I read about hardcoding and although I'm not quite sure what that means, I think that is what I will be doing as I will not be referencing outside of my form.



********

Also, the items in these menus are long/descriptive in nature, is there a way to refer to the lists in the code without having to type everything out? In my form (instead of "state") I will have lab tests "Test_1" with CPT codes attached, that is the list includes items like:



93880 - carotid duplex scan, bilateral

93882 - carotid duplex scan, unilateral



and in drop-down list 2 I have items like:



454.0 - varicose vein with ulcer

454.1 - varicose veins with inflammation



it would be such a pain to type each out in the code, but if there are no other ways around it, that is fine too.



>>>>>>> QUESTION 2.



The referring physician will have the option to email this form to the vascular lab scheduler. To prevent an "accidental" changes, I would like the form to be a "live form" for people to fill out, but upon return, the form to be a static PDF file, that is, the person receiving the email does not have the option to make any changes (purposeful or accidental), is there a way to do this?



THANK YOU SO MUCH IN ADVANCE!



again, I apologize for asking for help for what I'm sure is an easy fix. I don't know very much about the coding language, if it is not too much to ask - step-by-step would be helpful.



I'm using Adobe LiveCycle Designer 8.0.



Thank you.



-Viv
0 Replies

Avatar

Not applicable
Hi Im also looking something similiar to above. any help please

Avatar

Level 7
You have to add some FormCalc/JavaScript to clear the second drop dowh/combo list and then use the "addItem()" function/method to add the items to the other field.



See Programming List and Combo fields in Acrobat and LiveCycle forms

Part 1, http://www.acrobatusers.com/tutorials/2007/js_list_combo_livecycle/, by Thom Parker for a working example.

Avatar

Not applicable
Hi Geo,



Thank you for the link.



Sorry, this is very difficult for me to explain not knowing the scripting language, but I will try my best not to confuse you too much.



I was able to get Thom's example to work, and based on that, I was able to get this hypothetical situation to work:



***********************



< script contentType="application/x-javascript" name="Example2" >var oTestOrdered = {

12345678912345678: [ ["-"], ["AAA (Endologix)"], ["AAA (GORE)"], ["Aortic Arch"],["other"]],

56565: [ ["-"], ["Varicose Vein"], ["Venous Insufficiency"], ["Spider Veins"],["Symptomatic Var Veins"]],

46546: [ ["-"], ["TA biopsy"], ["CEA"], ["amputation"], ["debridement"]]

};



function SetTestEntries()

{

ICD9_2.clearItems();

ICD9_2.rawValue = null;

var aTests = oTestOrdered[xfa.event.change];

if(aTests && aTests.length)

{

for(var i=0;i<aTests.length;i++)

ICD9_2.addItem(aTests[i][0].toString());

}

}



</ script >



***********************



HOWEVER, I cannot get something like this one to work (the only difference is that I added a "9" to the first option) it seems as though I cannot insert anything beyond 17 consecutive characters (no dashes and underscores are allowed either):



------------------------------



< script contentType="application/x-javascript" name="Example2" >var oTestOrdered = {

123456789123456789: [ ["-"], ["AAA (Endologix)"], ["AAA (GORE)"], ["Aortic Arch"],["other"]],

56565: [ ["-"], ["Varicose Vein"], ["Venous Insufficiency"], ["Spider Veins"],["Symptomatic Var Veins"]],

46546: [ ["-"], ["TA biopsy"], ["CEA"], ["amputation"], ["debridement"]]

};



function SetTestEntries()

{

ICD9_2.clearItems();

ICD9_2.rawValue = null;

var aTests = oTestOrdered[xfa.event.change];

if(aTests && aTests.length)

{

for(var i=0;i<aTests.length;i++)

ICD9_2.addItem(aTests[i][0].toString());

}

</ script >



------------------------------



The form I am creating is a Vascular Lab request form, where the test ordered (drop down box 1)has a CPT code to reference the test being ordered (i.e., 93880 - Carotid Duplex Scan, bilateral) and the test has a set of diagnoses (ICD-9 codes) in drop down box 2, associated with that test (i.e., 459.81 - Venous Insufficiency)



I have found that I do not have a problem with the "diagnoses" but I cannot add the descriptive test select in the first place. That is, the code works fine if I leave it as "93880" but not "93880 - description." I have also run into the problem that I cannot use dashes or underscores, nor can I type more than 17 characters otherwise the code no longer works.



Is there something I need to add or remove in order to make this work?



Thank you in advance for your help and patience!

Avatar

Not applicable
Disregard. I got it to work by adding quotations.

Avatar

Not applicable
I have one drop down menu labeled "Test" and another "Diagnosis."



I was able to get "Diagnosis" to populate according to the selection made under "Test." I have two buttons: "Add Diagnosis" and "Remove Diagnosis"



QUESTION:



When I click "Add Diagnosis" a new drop down menu appears below the first "Diagnosis" drop down menu. How can I get that second drop down menu to populate information based on the initial "Test" selected?



Alternatively, the form can also utilize a box where when a person selects a diagnosis, it gets added to the box instead.



I have not tried hardcoding with "array" as I don't know how to do it. It took me a few days (after posting to the forums) to figure out the problem I had and posted for help on Sept. 3. If there is no way around it but to code using the "array" method, your help - any help, would be appreciated. Or even if someone can take a look at the form for me and see what I'm doing wrong...



Thank you in advance.

Avatar

Not applicable
Hi, is there anyone who can help with the above problem? I would appreciate any help offered.



Thank you!
page footer