Chang rows in text area

Hi guys,

An easy one: how to change the number of lines in the Text area. I want less rows to start from.

Inspecting the page, the class is .kn-textarea but don’t what the name of the row variable. tks.

By the way, this code of John Parsons is great. tks!

/Auto expand text area/
$(document).on(‘knack-scene-render.any’, function (page) {
$(“textarea”).on(‘input’, function() {
var scroll_height = $(“textarea”).get(0).scrollHeight;
$(“textarea”).css(‘height’, scroll_height + ‘px’);
});
});

I don’t know what yours is set at by default, but you can update the minimum size in CSS

.kn-textarea {
min-height: 80px;
}

1 Like

Thanks Jarrod!