Skip to main content

Hi,

 

I have set a Text Area to show 5 lines.

However, when the user is entering data they can carry on entering data beyong the 5 lines.

 

The problem is that i then do a convert to PDF, the PDF naturally only shows 5 lines of text and then rest is not captured.

 

How do i force the form to not allow more than the 5 lines of text stipulated? -It seems the ROW setting is only for DISPLAY purposes, but doesn't enforce 5 lines of text entry.

 

The text area needs to be limited by the number of lines (not characters)  as the text entry is not straight forward words, could be system info which contains spaces etc.

 

Any ideas please?

 

 

Hi,

 

There is a maximum length setting which you can set, but this is not aware of the number of lines.

I suggest you set this to a value roughly equivalent to 5 lines.

This will prevent the user from entering more than the specified number of characters.

 

Not a clean solutions, but something you can try is to place 5 text boxes underneath one another and then have a data label linked to the actual field, using an expression to concatenate the entries and saving it (or even keeping the 5 and saving them separately).

 

Hope this helps!

Regards,

JohanL


The rows setting is just a visibility counter. The input rows are hard capped at 1000 but you cannot limit the number of rows that get input below that, you can only limit what is  shown.


Hi,

 

Thanks for the replies, but as mentioned, i can't do it on the number of characters as the lines may not be fulled used in text, some lines by contain empty spaces inbetween text.

 

So there is no way of limiting text entry by the number of rows specified? Surely that can't be right? Is this an oversight on smartforms?

 

If this is the case, then that is a big problem for me, as I need to convert the form into PDF for emailing. If half the text is missing, then this is gonna cause problems.

 

Is it not possible to do a rule on that Text Control to check if number of lines >6 then prevent any more text being entered?

 

Most of the stuff i use K2 smartforms for required conversion to PDF for offline authorisations, so if this is not possible, I can't see how I can justify to management any future renewals....

 

For something so simple as a text area, is there any other way to fix that text box to 5 lines and no more?


It is absolutely correct. You will not be able to directly alter the design of the text area control. It will always be able to recieve up to 1000 rows of text. Now, what you can do is set up rule that checks the text are for a character count and if that count exceeds a predefined (by you) limit the user won't be able to proceed.


Ok, how about this? Is this possible.

 

1) Text Box is set to 5 Rows

2) User entered all data but e.g. goes onto 8 Rows when entering the info on the form.

3) User clicks on Submit form.

4) A rule kicks in to expand the Text Box to the last character (so that all the text can be seen)

5) SAVE AS PDF rule then runs and captures all the information....

 

K2 have it down as a feature request, but I need a workaround quick.

 

 


Hi,

 

I think something similar to this will work.

Use a hidden data label and in its expression set it equal to the text area.

When the user clicks submit, hide the text area and show the Data Label and then run the Save as PDF rule.

This should work.

 

Let me know.

 

Regards,

JohanL


Johan,

 

That is Genius, tried it and that works.

 

Only issue i have then is that any subsequent boxes underneath on the form get moved up or down depending on the contents of the Data Label. This results in my PDF being too long and ending up on two pages.

 

If only there was a way to limit the number of lines in the text box, then the FORM layout would stay intact.

 

At least I can see all the contents of the text boxes, but I have a signature strip at the bottom of the page. If the Data label in large, i'm see the signature strip cut off from the bottom of the first page and half of it on the second half. So when my clients print out the PDF, it will look fairly amateurish.

 

Hence if I could fix the number of lines in a Text box, then my form would look the same.

 


Reply