Error handling/Catching mistakes when submitting something in admin_config #5023
Replies: 2 comments 12 replies
-
add required parameter to needed field |
Beta Was this translation helpful? Give feedback.
-
This indeed sets the field as required. @LaocheXe For checking if a field is filled in, use the validate option. Do you have other needed tests? Those can go in the public function You can try my Cookbook plugin, or Wrapper to look for inspiration. |
Beta Was this translation helpful? Give feedback.
-
Working on a plugin, and I am trying to add a "error message to admin/user when they submit something that is already in the database table, and if they left something blank.
I thought putting in an if statement in beforeCreate($new_data,$old_data) would work, but seems it's being ignored, and still submits the data (which in my case for testing, nothing is filled out.)
Or should I have put that in the onCreateError section?
Beta Was this translation helpful? Give feedback.
All reactions