Documentation / Tutorials / Tutorials & How to’s

Scrolling to first error in the larger form during validation

/ Tutorials & How to’s / Scrolling to first error in the larger form during validation

We start by adding a custom rule, for trapping spam entries.

Use the 'honeypot' attribute to a hidden form element, It should be the last element in the form, this will do two things

  1. In case of any validation error, it will take the focus to the first element with an error
  2. You can also trap the spam if this hidden field has any value in the backend.

 

Categories
Most Popular

Leave a Reply

Your email address will not be published. Required fields are marked *