Copy link to clipboard
Copied
Hello All,
Does anyone know how to align text in a dropdown field list when editing in Prepare Form view.
I have created a dropdown list field and want the "item list" text to appear centered horizontally on the page, but the align tools in Prepare Form view are greyed out. I've spent hours trying to figure it out using Adobe help and online searches, but have been unable to find a solution.
I'm trying to horizontally center the "item list" names on the page when the user selects the name from the dropdown field.
Thanks in advance for any solution.
Best regards,
Jeff
Copy link to clipboard
Copied
This can only be done using tabs, which requires using a custom script. An example of such code. It should work and will give you an idea. You can test run it in the JS Console. (shortcut CTRL+J).
Please note, this script will overwrite the current values in your field.
var items = [
"Item1\t\tItem1_DropDown1",
"Item2\t\tItem1_DropDown2",
"Item3\t\tItem1_DropDown3",
];
this.getField("Dropdown1").setItems(items);
You can set your code at Document Level (Tools > Javascript >Document Javascript" or Mouse Up event of a Dropdown field.
-Bhavna
Copy link to clipboard
Copied
Bhavan,
Thanks for you reply. I wish I knew enough about Adobe, java script, etc. to be able to use the script you sent me. Unfourtunatley I'm new to Adobe, a beginner user at best and not sure what to do with the information you sent. I really do apperciate your time and effort in responding to my cry for help.
Best regards,
Jeff
Copy link to clipboard
Copied
Did you ever get this to work? I'm having the same issue, it's soooo painful. Why can't Adobe allow such a simple alignment tool.
TIA.
Copy link to clipboard
Copied
The align tools are active when you select 2 or more objects in this view.
Copy link to clipboard
Copied
Bernd,
Thanks for the advice. Your suggestion does activate the alignment tools, but does not allow me to center align the dropdown "list item" within the field. I appericate your time.
Best regards,
Jeff
Copy link to clipboard
Copied
If this possibility existed it would be a property of the PDF format (aka ISO 32000-1), not a function of Acrobat (or any other software).
It is what allows PDF forms to look the same everywhere.
If I'm not mistaken, this property exists in the PDF 2.0 format (aka ISO 32000-2), wait and see…