I would like to hook into the javascript validation. The problem is when you have a really long form and you have a scrollbar and you are scrolled down to the bottom of the page and click submit. If you have a validation error in the top of the page you won't notice the error and the user can not understand why the will not submit.
Therefore I will hook into the validation and do scrollToError or just throw an alert box.
Does anybody have any pointers on how to achieve this?
Hooking into javascript validation
Hi
I would like to hook into the javascript validation. The problem is when you have a really long form and you have a scrollbar and you are scrolled down to the bottom of the page and click submit. If you have a validation error in the top of the page you won't notice the error and the user can not understand why the will not submit.
Therefore I will hook into the validation and do scrollToError or just throw an alert box.
Does anybody have any pointers on how to achieve this?
what about jquery validation... i found these two posts...
http://stackoverflow.com/questions/1218118/overriding-a-function-within-the-jquery-validation-plugin
http://stackoverflow.com/questions/1227360/jquery-validation-plug-in-and-scrolling
I prefer to use the jQuery Form Validation plugin as it offers a great amount of options with regards to showing messages, message placement etc
Comment author was deleted
Hi Christian,
Try this http://forums.asp.net/t/1126420.aspx
Comment author was deleted
Just make sure to set the correct validation group, should be set to the clientid so <%= this.ClientId %> should do it
Thanks for all the answers after some more google around I found this http://forums.asp.net/t/1089469.aspx
It was super simple and resolve my needs SetFocusOnError="true"
In /usercontrols/umbracoContour/RenderForm.ascx
Mayby it should be default in Contour
Comment author was deleted
Nice, thanks for the update
is working on a reply...