Hi,
I have field map to a textarea control.
I have the max length of the field is 1024 bytes.
and the number of rows of this text area set to 3 and cannot be more than that due to page layout.
When I type in more than 3 line, the textarea become scrollable. That is good.
However, I want to print this page. The print layout only display 3 lines.
So, how can I reset the number of rows of this textarea to the actual number of lines of the content before print it?
Thanks,
Xiaoli
how to set textarea number of rows in javascript?
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 272
- Joined: Fri Dec 14, 2012 2:55 pm
- Location: Ottawa
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Are you generating a PDF? If so, the simplest solution is to make the textarea display only, or use the report option with form.generatePdf() which makes all fields display only. Then the textarea should take up enough space to accommodate the text content.
Here's the doc: http://dev-docs.verj.io/ufs/doc/Printin ... c369529428
Doing this any other way is quite difficult; you can't change the number of rows dynamically other than by using Javascript on the client. If you search online, you will see quite a few exotic solutions for auto-sizing textareas.
Here's the doc: http://dev-docs.verj.io/ufs/doc/Printin ... c369529428
Doing this any other way is quite difficult; you can't change the number of rows dynamically other than by using Javascript on the client. If you search online, you will see quite a few exotic solutions for auto-sizing textareas.
0 x
-
- Ebase User
- Posts: 272
- Joined: Fri Dec 14, 2012 2:55 pm
- Location: Ottawa
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Who is online
Users browsing this forum: No registered users and 20 guests