Set max height and scrollbar on multiline textfield in Modern List with RichForms?
I have a modern list and I created a disp form with classic Rich Forms. In the list I have a multiline textfield and I want this field to be displayed with a max height and with scrollbars. Is that possible?
0
-
therefore you have 2 options
- Set it using Javascript in an "Execute Script" form load action
var myElements = document.querySelectorAll(".ard-formwebpart .ms-rtestate-field");
for (var i = 0; i < myElements.length; i++) {
myElements[i].style.maxHeight = "200px";
myElements[i].style.overflowY = "auto";
} -
Set it using CSS as described here: How can I use CSS styles on my form? or simply add a script editor webpart with the following code (this might be the better option as the styles are loaded immediately, where the first option with the form load action will execute at the very end)
<style>
.ard-formwebpart .ms-rtestate-field {
max-height: 200px;
overflow-y:auto;
}
</style>
BR Matthias
0 - Set it using Javascript in an "Execute Script" form load action
Please sign in to leave a comment.
Comments
1 comment