Copy link to clipboard
Copied
I can't seem to alter the justification of the data in the field. It is automatically left justified. I have a list of items that I need to have centered and not left justified.
Not possible. You can add spaces (or tabs, using a script) before the
items, though.
Copy link to clipboard
Copied
Not possible. You can add spaces (or tabs, using a script) before the
items, though.
Copy link to clipboard
Copied
Where can you add a script, I tried looking for that as well?
Copy link to clipboard
Copied
You don't add this script. You need to execute it (from the JS Console, for example) to set the items of the field.
The code would be something like this:
this.getField("Dropdown1").setItems(["\tItem1", "\tItem 1.1", "\t\tItem 1.2", "\tItem 2"]);
The "\t" escape character is a tab. I used it twice to create indentation, but you can use it only once to align the text (somewhat) to the center of the field.
Copy link to clipboard
Copied
Would I apply this to the format field?
Copy link to clipboard
Copied
No.
Copy link to clipboard
Copied
Hi
If you put this code Format/Custom/Custom Script Code Area It will be work but you must change the code like this "this.getField("Dropdown1").selectItems(["\tItem1", "\tItem 1.1", "\t\tItem 1.2", "\tItem 2"]);"
After that just change the Item names (Item1,Item1.1...) t must be stay and don't forget change dropdown name .This way you can make to center your dropdownlists
Copy link to clipboard
Copied
The name of the method is setItems, not selectItems, though...
Copy link to clipboard
Copied
post deleted
Copy link to clipboard
Copied
If I'm undertanding correctly and you are talking about the alignment of text that a user will enter (or has entered) inside a FIELD, you can adjust the alignment in the field's PROPERTIES menu >> in the OPTIONS tab.
See attached image.
Copy link to clipboard
Copied
This is a text field. The question was about a drop-down field...
Copy link to clipboard
Copied
Ahhhhh. I understand.
Copy link to clipboard
Copied
Yeah. Same issue. Not asure why we can center (or left right) align a text field, but not a drop down. Makes no sense.
Copy link to clipboard
Copied
Having problems with this too. Thank you all for the feedback on the post,