Multiple field height auto

Hello, I have a multiple field. How to make auto increase height when multiple text there is ? without scroll in window.
image

I try this code in this article, but have an error
image
It doesn't work for SharePoint 2019 onprem? only online?

i tried this css

.fd-form textarea.form-control {
    height: 500px;
	}

It works, auto height doesn't work ....

Hello @ixxxl,

The code from the post that you've shared works only for the plain text field.

For the rich text you can try out the code from this post:

1 Like

@mnikitina
image
I tiried with plain text first code and get error with $refs undefined
An your code with rich text, -another errror

@mnikitina
I reopened form, published it again and now it works perfect!! Thank you!

@mnikitina


But on plaint text doesn't work ... with this code

fd.spRendered(function() {
var textArea = fd.field('{FieldInternalName}').$refs.textarea;
function recalcHeight() {
    textArea.style.height = (textArea.scrollHeight > textArea.clientHeight) ? (textArea.scrollHeight) + "px" : "120px";
}
recalcHeight();
$(textArea).keyup(recalcHeight);
});

PS. I found a mistake in my code in field name {} - i delete just this and all works, thanks!