Hi,

I am bit confused about the custom form validations. If there are two invalid inputs from a user, is the focus (with red lines and invalid message) on only one input? Instead of both the inputs?

Nishit Sadual wrote:

Hi,

I am bit confused about the custom form validations. If there are two invalid inputs from a user, is the focus (with red lines and invalid message) on only one input? Instead of both the inputs?

 Hello Nishit,

The focus allows the cursor to edit the input (without the user having to click on the input to start editing). 

Since you can't edit multiple inputs at the same time I would say it would only go to one of the inputs, although the red lines and invalid messages are shown for all invalid inputs.

I hope it helped.


Best regards,

Clarisse


EDIT
You can see it on Service Studio details, the input focus in the first invalid input. Try to hover over the action you are using for the focus and see the description.


Solution

Hi Nishit,

Clarisse's answer is spot on, but I'll just summarize its contents for clarity:

  • All invalid inputs will be visibly marked as invalid (typically the red border and error message)
  • If you are using the Input_FocusFirstInvalid Server Action, it will move the focus/cursor to the first invalid input

Regarding the Input_FocusFirstInvalid server action, I haven't seen it being used in recent projects, I thought it might have been deprecated... but I guess not :)

Hope this helps!

Solution

Hi,

I just tried in my demo app. It focuses on both the invalid fields. This is a Reactive Web  App by the way.

Nishit Sadual,

The cursor is clearly only on the first invalid module... that is what is commonly called the focus.

Both invalid inputs have been visually changed (red border + red error message) so the user knows they have problems. This is exactly what Clarisse and I have described.

If you can explain to us what is the behavior you would like to get we may be able to help you, but what you are seeing is how it works by default in OutSystems.

Thanks Jorge and Clarisse