Skip to Content
avatar image
Former Member

Personas 2.0 SP03: How to limit the user's input text?

Hi Personas 2.0 SP03 experts,

I am using a text field for user to input some text. With SP03 it allows the text wrapping too. Due to the limitation of saving, I need to "limit/inform" user that he can only type certain number of chars, say max 100 chars.

Below are my thoughts:

Solution 1: while user is typing in the chars, there is a dynamically updated label indicating how many chars left to input. But how to detect how many chars have been input by users while he is typing text?

Solution 2: Is there a way in Personas to block/stop user's typing activity when the number of chars reach the max number of chars allowed?

Solution 3: is there something like "loss focus" event for the text field so that when user left the focus, an auto check or auto truncation can be performed so user can see what text is actually input in the text field? The drawback is that user may have typed too many chars without being alerted.

Any ideas? Thanks.

Dong Zhu

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Sep 10, 2015 at 10:58 AM

    There are no appropriate events in either Personas 2 or 3 currently that will allow you to implement any of your options exactly, I'm afraid. The closest thing I can think of right now is in Personas 3. There's an "onBeforeRefresh" event that triggers a script. This event is a screen event that is triggered before an interaction with the back-end system, so on a button press, enter press, etc. That script could check the lengths of all appropriate text fields and truncate them as necessary, also giving some kind of alert (turn affected text red, put a message on the screen, alert pop-up, etc.)

    I can't immediately think of a way to do this in Personas 2.

    Steve.

    Add comment
    10|10000 characters needed characters exceeded