I’m struggling to get the vertical wrapper for inputs to grow as one continues to type. Ideally just like any messaging app, if you type enough in the form, it just adds a line inside the form. that way one can see most of what they’ve typed before hitting some kind of max and forcing scrolling.
It seems that all the forms I’ve tried this with just cannot line break except for the long answer. However the long answer doesn’t seem to give me control over its initial height (intended 1 line to start)
This is a strange situation I’m in as it seems that all of the form wrappers don’t allow for dynamic verticals growth. Short answer just doesn’t seem to be able line break at all (even with no wrap set to off), and long answer doesn’t grow height dynamically. Once all the present lines are filled, it switches to a scrollbar (even when overflow is set to hidden!)
Hi @Micah , I’ve tried your technique and it’s not working for me. Is there anything missing? Also, does it work when the user is clearing the content completely from the text input?
I forked the basic input repo and added the dynamic height option… you can fork it and use it in your project (when using it, you will need to define background color, border color, etc… it does not come filled by default)
Create a variable (for example, textareaHeight) of type Text, with an initial value such as 43px, which will be responsible for dynamically storing the field height. Then, in the Textarea (Long Answer) component, create a workflow on the On Change event and add a Set Variable action using Run JavaScript with the following code:
This ensures the height is recalculated correctly both when text is added and when it is removed. Finally, go to the input properties, change the class to textarea, and bind the Height property to this variable ({{ textareaHeight }}), so the component dynamically adjusts and automatically updates its height whenever the text is modified.