4
votes

We have a long form made with WebForms For Marketers Module with a validation summary at the top. BY default, when one of the fields in not validated then that field gets focus. How can I disable this functionality so that after postback the user stays at the top of the page (so that user could see validation summary)?

2
I'd like to see an answer to this question :) - RG-3
@RG-3, vote it up then ;) - Yan Sklyarenko

2 Answers

0
votes

On the top of my head I see two options. Option 1 would be to disable client side validation. That would force the page refresh and the user would see the validation summary. Option two would be to write some JavaScript that listens to the validation event and scrolls the page to the top after the validation is finished.

0
votes

You can resolve this my writing javascript/jquery to validate these fields instead of using validations. You will have flexibility in displaying these messages.

Step1: Add custom css classes for each field on WFFM form /sitecore/system/Modules/Web Forms for Marketers/Settings/Meta data/Css Classes http://www.symsoftsolutions.com/Blog/List/WFFM-Custom-Class Step2: Access this css classes using the jquery Step3: Add or Append the javascript validation messages