• (original question posted on CF7 support forum, they recommended to post it here)

    Hi,

    I need some help with Contact Form 7. I would like to prevent saving empty fields from a contact form to the database. It needs to work to input text fields that are empty and for selects with first_as_label.

    I know first_as_label is supposed to force user to choose one option and it works well but I’m using Conditional Fields for Contact Form 7 plugin so some selects are nested and not required if the user makes some specific choices. In some cases the user doesn’t need to fill that selects but they are still sent to the database.

    I’m using Contact Form CFDB7 plugin to show Contact Form 7 submissions on the dashboard and those not required selects appear too, empty.

    Any help is greatly appreciated.

    Update: it can be a code to hide empty fields on the submission dashboard

  • The topic ‘Prevent saving empty fields to database’ is closed to new replies.