Question

how to gain focus on the field which has error messages

Hi All,

I have a requirement where i have to show the focus on the field which has error messages. For Ex: If i have 10 fields on the form, and on submit there is some error message shown on 3rd field, then the focus should also be displayed on the field which has error message.

is it doable?

Thanks in advance.

Comments

Keep up to date on this post and subscribe to comments

Pega
December 30, 2018 - 11:47pm

Hi  Amulya,

 you  might have to use javascript to achieve this functionality . Please go through the below url which helps in designing your requirement.

https://community1.pega.com/community/pega-support/question/error-needs-be-focus-screen

December 31, 2018 - 5:04am

Hi ,

Thank you for the pointers. But that example seems to be different to what i want. For me, dynamically focus should be on the field which has error messages. but the example there is on a button which will have an id to be used in javascript code.

So, now i have to write a javascript :(