not save empty/null fields?
-
I have a relatively complex form for which I need to prevent saving null value fields to the database.
The form in question is for registering multiple students. The number of students is selected by the user, with conditionally toggled sections repeated per that number.
If there is only one student, I don’t need empty fields for 4+ non-existent students saved to the db.
IOW, in this particular case, I need to not save the hidden field groups. Hidden groups don’t get validated and shouldn’t be saved, because their fields are empty (clear_on_hide function).I will have subadmins who will be handling the user registration data, and having all those blank entries is clutter that makes viewing/editing much less convenient, as they have to scroll way down to get to the bottom to view other pertinent data, such as user attached signature.
I am able to eliminate null fields via hook with the CFDB7 plugin, but I don’t see an update-proof way to do this with your plugin. Unfortunately, the CFDB7 plugin does not allow for editing the db entries via admin panel, so I need your plugin to give my subadmins edit capability.
- The topic ‘not save empty/null fields?’ is closed to new replies.