Press "Enter" to skip to content

How to make Textarea resizable in K2


By default Textareas have static width and height. But with a piece of code you can make any textarea resizable. Please, refer to the post How to add JavaScript on Smartforms, if you need a more detailed description. In this post I will provide only some tiny demo and a piece of external code to add onto your Smartforms. This was tested by me even on K2 Cloud.And here is the final result, that you will achieve by adding the code below:

Text area resizable demo

All you need to do is to add the following CSS and JavaScript code onto your form.

If you need to make a specific textarea resizable, then you will have to modify the javascript to find and change only 1 certain textarea.

I have create a separate repo on GitHub, where I will try to collect all such nice K2 features. You can find it under K2Devs.

Leave a Reply

Your email address will not be published. Required fields are marked *

5 + 15 =