Text align in read only field form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2017 01:14 PM
Hi Team,
I have been trying to align text to the right in a read only (or disabled) field.
Following script works with active fields, but it does not work for read-only fields:
function onLoad() {
var el = g_form.getControl('volume');
el.style.textAlign='center'; //DOM manipulation
}
Also tried other approaches with no luck:
$j('#fieldId').css("text-align" ,"right");
Note: This style is for Form only. List format is OK.
Please help.
Thank you,
Regards.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2021 09:08 AM
This does not work on read only fields though. I created a new post today due to that reason.
Have you run into this issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2021 04:49 AM
Probably a bit late to help you, but found the solution so replying for the benefit of others.
Right click on the field label in form view.
Select Configure styles
Create new style
In style section write your CSS code, in this case:
text-align: right
Submit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2023 11:17 AM - edited ‎07-20-2023 11:19 AM
To be clear, it's the Value field on the Style record that determines whether the CSS applies to the form or the list.
For the list view, Value should be: "javascript: 1==1;"
For the form view, Value should be left blank.