How to scroll to validation feedback message on form submission in Mendix?

0
How can I make the page automatically scroll to the validation message after clicking the confirm button, if there are any validation errors?
asked
3 answers
1

As Raju mentioned before, his solution is correct. To improve his answer though, you will have to put a class of '.has-error' in the Target Selector section of the Scroll To JavaScript Action activity. You get this activity out of the box but can only be used in nanoflows.

 

All validation messages have a '.has-error' class appended to them

 

IF you are already using microflows, make sure your button action is a nanoflow and use the microflow as a "sub-microflow" in this case. After your validation, make sure you are able to catch the negative path in the nanoflow so that you will direct it to use the 'Scroll To' activity.

 

image.png 

answered
8

Hello Jeff,

seems you are looking for some scroll functionality, you can try ScrollTo Web action   marketplace module.if not then elaborate your requirement more.

 

image.png

answered
0

Hi Jeff,

When using a Validation feedback widget, it asks you to choose the attribute. whatever the message that you give, the same message will be displayed below the field on the UI  after Submit action if validation fails.

by default it displays in red colour it has the same width of the attribute/field on UI.

 

If it is not working as expected, please give the detailed requirement

answered