Expand textarea

marcaguilar pro asked 7 years ago

To whom it may concern,I'm trying to make a comment field expand on height as the text gets long and a new line is added. Also I would like to have initially the textarea's height be like an input field, one line. Is there a way to make this?

Marta Szymanska staff pro premium answered 7 years ago

Hi, Have you seen our Bootstrap Textarea page in the documentation? Take our material textarea and then copy and paste javascript code from this page to the tags<script></script> on the bottom of the page. It should work. Best, Marta

marcaguilar pro commented 7 years ago

Hi Marta, Thank you for the information. I had read that area already but what I'm looking for is the same if you go to Youtube and see their comment textarea. Upon overflow, it doesn't show a scroll bar and that the height of the area expands. The height is not fixed which enables showing all the text. Can you please advise for any work around on this with MDB? Looking forward to hearing from you! Thanks, Marc

Marta Szymanska staff pro premium answered 7 years ago

Hi, So, we don't have textarea which shows all the text but as I sent you, there are a lot of ways on Stackoverflow how to change fixed textarea to flexible textarea. Best, Marta

marcaguilar pro commented 7 years ago

I found this from your colleague. https://mdbootstrap.com/support/text-area-auto-grow/

Marta Szymanska staff pro premium commented 7 years ago

OK, great.

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No