Input widget feedback message when input is more than max length

Input widget feedback message when input is more than max length

  

I have an input widget where I let users input a maximum of 500 characters. I want to show a feedback message when the user enters too many characters.

The input widget destination on change is set to a save action. This save action has an input parameter "new value" which is set to the value of the input widget.

I tried checking for length(value) > 500, but this is never true because the input field automatically truncates it's input value to a maximum of 500 characters, and only then pushes it to the destination action.

Is there a way to catch the value that is too long, or to see that the user put in a value longer than 500 characters, so I can send the user an error feedback message?

Solution

Hi rob knipscheer,

You can remove the input max lenght

Then assign a server action to onchange run your validation logic

And inside the action you can set the message you need to display:

Regards,

Solution

You can use the widget "Character Count" if you want to warn the user how much characters he's got left.

Marco Arede wrote:

Hi rob knipscheer,

You can remove the input max lenght

Then assign a server action to onchange run your validation logic

And inside the action you can set the message you need to display:

Regards,


Hi Marco,

i have an input widget which is of 1000 characters length but it allows only about 50 characters. 

(Maxlength - 1000, Type - Text and the variable which is used is also of 1000 characters length ) could you please tell me what could be the issue ?

Thanks,


Hi Mamini Konidena,

Hi Marco,

i have an input widget which is of 1000 characters length but it allows only about 50 characters. 

(Maxlength - 1000, Type - Text and the variable which is used is also of 1000 characters length ) could you please tell me what could be the issue ?

Thanks,

That is a strange behaviour, could you share an example?