Left justifying value on integer field

samadam
Kilo Sage

I have an integer field that is displaying value to right end, I tried to add style but it only shows up left justified in the list view. How can I have it displayed on the form also left justified?

Thanks

1 ACCEPTED SOLUTION

sndangibbard
Mega Guru

You will have to add style to the page with script, either an onLoad Client Script on an individual form or through a UI Script if you want to effect every integer type field. You could do something like this:




jQuery('head').append('<style>.form-control.decimal{text-align:left!important;}</style>')


View solution in original post

4 REPLIES 4

sndangibbard
Mega Guru

You will have to add style to the page with script, either an onLoad Client Script on an individual form or through a UI Script if you want to effect every integer type field. You could do something like this:




jQuery('head').append('<style>.form-control.decimal{text-align:left!important;}</style>')


That worked. Thank you.


sathish639
Tera Contributor

There is no need for scripting. you just have to right click on the required integer field --> select "Configure Styles" --> add below style under Style



find_real_file.png


Andrew Bettcher
Kilo Sage

Styles is the way to go. Tried the script first before reading on but it didn't work. It might not be the script that is at fault. Could be my execution.

 

However, on decimal fields, the text_align style defintely works on London