I found this code that was helpful for Classic Designer, but not the new Modern Designer.
$( document ).ready(function() {
/* call autoGrowML function on existing fields on canvas */
autoGrowML();
/* ensure that autoGrowML function is applied to any textAreas that appear as a result of a new table row or new colletion item */
$('.cf-table-add-row, .cf-collection-append').on('click', function() {
autoGrowML();
});
});
function autoGrowML() {
/* Iterate through each textarea with autoGrow class and call function to expand/contract with amount of text entered */
$('.autoGrow textarea').each(function () {
h(this);
}).on('lookup change keyup', function () {
h(this);
});
}
function h(e) {
/* Function that actually performs the expansion/contraction of specified fields */
$(e).css({'height':'auto','overflow-y':'hidden','min-height':'26px'}).height(e.scrollHeight);
}
Does anyone know of the code that will auto adjusted the size of my multiline fields in Modern Designer?