For the last 10 years I've been using GravityForms for every form integration in WordPress. I think it is one of the best plugins developed :) But of course everything can have flaws.
One of the problems for me with basic version of GravityForms are error messages. There are three options how to work with them.
1. Leave everything on GravityForms
You can fill in only one text field under section Appearance that represents all error messages for that field. This approach can be confusing for the user.
2. Translate default GravityForms messages
Using a translation plugin such as WPML, you can translate the default error messages to your language. But you won't be able to change the default English text.
3. Add your error messages
The last option is to write custom code that checks all form fields and returns a custom error message. With this approach, you have to change the code every time you add a new form, field, or just want to change the text of a message.
For me these options are not enough. I would like to define a specific error message for a specific occasion like required, unique, ... . I don't wanna waste time with changing my theme code every time a new field is added. This is why I decided to write a plugin that will allow administrators to write a custom error message for every occasion.
This image should represent how the final message editor will look like
In the next post we will talk about developing this plugin.
Did you find this article valuable?
Support Zbynek Nedoma by becoming a sponsor. Any amount is appreciated!