Can I look for a hard return in a multi line text box?


Badge

I have a multi line text box in a repeating section and I get that I can validate the field for character length, however, what we're actually worried about is people going beyond the 5 lines we have allowed. Right now, the solution is in phase 1, which means that the users fill out the form then print it out. We need the users to print from an edit screen, hence why we need them to not go beyond 5 lines. Is there a way to do that using a runtime function? I'd like to stay away from JavaScript if possible.


2 replies

Userlevel 5
Badge +14

to calculate number of line feed characters in multiline textbox you could eg. use following formula

length(replace(mltb,'[^
]',''))

note it calculates number of line feeds, not number of lines.

you will likely have 1 line more then number of line feeds

Userlevel 5
Badge +14

Hi ‌, did this help to resolve your issue?

Reply