Copy link to clipboard
Copied
i am making a form .. in which following items has to go to the dropdown menu:
Z80.0: Family history of malignant neoplasm of digestive organs
Z80.1: Family history of malignant neoplasm of trachea, bronchus and lung
Z80.2: Family history of malignant neoplasm of other respiratory and intrathoracic organs
but the problem is..... we have very small space for dropdown to accomodate such long text.. so we decided to just put the codes...... so my question is:
is it possible that while pulling down the menu it shows full name.... but after selection the value is set to the short form...
like Z80.0 , Z80.1 after selection but while selection full name is visible..
Not really, no. The size of the drop-down menu will always be the same as the size of the field itself.
What you can do, though, is use a small text field to show the selected value and a button to open a floating pop-up menu with the options, using a script.
Have a look at the popUpMenuEx method of the app object. You can use it to display the long values, but only return the code so that it appears in the text field. You can even mark the already selected item with a tick, but that's a bit trick
...Copy link to clipboard
Copied
Not really, no. The size of the drop-down menu will always be the same as the size of the field itself.
What you can do, though, is use a small text field to show the selected value and a button to open a floating pop-up menu with the options, using a script.
Have a look at the popUpMenuEx method of the app object. You can use it to display the long values, but only return the code so that it appears in the text field. You can even mark the already selected item with a tick, but that's a bit trickier.
Copy link to clipboard
Copied
As i told we don't have space for any text field or big dropdown menu........
Copy link to clipboard
Copied
If you don't have a place for a text field, how will you have place for a drop-down? The two will take the exact same space and you don't need the drop-down. You just need a text field for the value and a button (of any size) to trigger the display of the pop-up menu.
If you don't have place for that I don't see how it can be done. You will need to re-design your file.
Copy link to clipboard
Copied
I tried to use popUpMenuEx but it doesnot value is not entered.. just menu pop ups and on clicking nothing happens
// Declare pop-up menu properties as an array. |
var aParams = [
{cName: "Z80.0: Family history of malignant neoplasm of digestive organs", cReturn: "Z80.0"}, and so onn |
// Apply the function app.popUpMenuEx to the app object, with an array
// of parameters aParams
var cChoice = app.popUpMenuEx.apply(app, aParams );
if ( cChoice != null ){this.getField("Dropdown1").value= cReturn};
Copy link to clipboard
Copied
You must use the value of cChoice.
Copy link to clipboard
Copied
value of choice also doesnot give any value
Copy link to clipboard
Copied
You should not be applying the value to a drop-down field, but to a text field, as I've described above.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now