Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Is it possible in pdf form dropdown menu show long text while choosing and show short form after selection

Engaged ,
Dec 22, 2016 Dec 22, 2016

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..

TOPICS
Acrobat SDK and JavaScript , Windows
878
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 22, 2016 Dec 22, 2016

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

...
Translate
Community Expert ,
Dec 22, 2016 Dec 22, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 22, 2016 Dec 22, 2016

As i told we don't have space for any text field or big dropdown menu........

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 22, 2016 Dec 22, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 22, 2016 Dec 22, 2016

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};

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 22, 2016 Dec 22, 2016

You must use the value of cChoice.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 22, 2016 Dec 22, 2016

value of choice also doesnot give any value

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 22, 2016 Dec 22, 2016
LATEST

You should not be applying the value to a drop-down field, but to a text field, as I've described above.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines