Drop down width
Good day,
because SP has problems to change the width of the Drop down fields i am using jQuery lines in the form load Actions and it's working good.
I am using this line:
jQuery('select[title="MyFieldTitle"]').css('width', 'XXXpx');
The form loads correct and all the fields get the new width.
One of these Drop down fields has a calculated expression (Assignment) and after it returns the value the css changes and the Drop down gets its default width. Is there a way to keep the new width which i assign with the jQuery line?
Thank you in advance
-
Hy Senad
The Problem on your solution is that the css is added to the lookup element just after loading the page. As soon this LookupControl is setted it loads newly and the css tag is removed.
Therefore you just need to add css to the head in the Load Actions. This css will not be removed on an control change.
E.g.
jQuery('head').append('<style>select[title="MyFieldTitle1"], select[title="MyFieldTitle2"] {width: 900px}</style>');
Kind Regards
Andreas Meier
0 -
It solved my problem, thank you!
0
Please sign in to leave a comment.
Comments
2 comments