Improved forms

This version improves the form accessibility and validation.

The star rating field is now validated immediately. So if the rating field is required and it is skipped, it will be wrapped in a red error box just like the other fields. This was a bit of a programming challenge because the star rating is an artificial input, not a native HTML input type like a text field or a checkbox.

Each field now has a tabindex value so you can use the <Tab> key to go to the next field.

Before, you had to click on a star to select a rating. Now, when the rating field has focus, as when you’re using the <Tab> key, the value can be set by pressing 0-5 as well.

Tested in Chrome, Firefox, Edge, and Opera. It mostly works in Safari except for the immediate validation of a star rating field.

I learn something new with every bug report and feature request. This is one reason I love this work in general and this plugin in particular.

Thanks to Terry Potter for the idea.

The “* Field Required” notice at the top of the form can now be disabled entirely on the Form settings tab.

Chris Dillon

About the author: Chris Dillon is a WordPress developer in Cleveland, Ohio, USA. When not trying to figure out why his plugins aren't working, he walks his rescue dog Gordo, takes a nap in the backyard or makes a mess in the kitchen.