Textarea auto height sizing

Hi guys,

I’m looking for an auto height sizing on textarea (or editor) in a form
ie : i have a textarea with lot of text and wordwrap, 'im looking for a function that would auto size the height of the textarea to see the whole text

A plus would be to be able to set a min value and max value

Thanks for your feedbacks,

Hi
You can use ready jQuery method autoResize()
I.e. like this:

myFormStruct = [ {type: "input", label: "Details", name: "inp3", rows:3} ]; myForm = new dhtmlXForm("myForm1", myFormStruct); inp = myForm.getInput("inp3"); jQuery(function(){ jQuery(inp).autoResize(); });
You need ‘autoresize.jquery.js’ file for it. You can find more information about it on jQuery site.

Thanks !
Will try this tonight

Works fine with this library from 2011
https://github.com/thomasjo/jquery-autoresize