Title: db &#8211; exclude fields
Last modified: July 6, 2018

---

# db – exclude fields

 *  Resolved [laCabriole](https://wordpress.org/support/users/lacabriole/)
 * (@lacabriole)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/db-exclude-fields/)
 * Hi , very useful plug In, thank you.
    Having a form with about 500 fields, I 
   would like to know if it is possible to delimit the saving to db to certain fields
   by a custom filter for I need only about 10 field values in the db. I read “vsz-
   cf7-db-function.php”. Is it for instance possible and would that work to add 
   a lot of fields to the “$cf7d_no_save_fields” array of the “vsz_cf7_no_save_fields()”
   function ? And : how could I entirely exclude another form from being saved? 
   Could I add a conditional, and where (vsz_cf7_get_posted_data($cf7) ?) excluding
   a specified CF7 ID? Thanx in advance

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Vsourz Digital](https://wordpress.org/support/users/vsourz1td/)
 * (@vsourz1td)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/db-exclude-fields/#post-10487523)
 * Hello [@lacabriole](https://wordpress.org/support/users/lacabriole/),
 * Yes, you can modify the code at your own risk. You can add the fields name to
   the $cf7d_no_save_fields but, you need to take in consideration that if two forms
   have the same name and you need to exclude from 1 form only, then it will not
   work. The field data will be excluded from both the forms.
 * We will not be responsible for any data loss or any miss configurations happen
   on your site.
 * You can restrict a form submission to the database by condition but it needs 
   to be added to “vsz_cf7_before_send_email” function in the same file. Hoping 
   that you know the correct way to add a condition, you can restrict the particular
   form submission by CF7 id.
 * Just to let you know, we will not be responsible for any data loss or site error
   occurred. This will be up to your own risk.
 * Regards,
 *  Thread Starter [laCabriole](https://wordpress.org/support/users/lacabriole/)
 * (@lacabriole)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/db-exclude-fields/#post-10495281)
 * Thanks for the answer,
 * I tried the first part ($cf7d_no_save_fields) before and it works well.
    The 
   exclusion of an entire form will be next. Not everybody wants to save every form
   of the site by default. That could be a neat but simple future feature of the
   plugIn: choosing the form to save.
 * I made another observation: Using your plugin in two identical sites (clones 
   as to say), in one of them the plugIn wouldn’t save any display preferences like
   hiding fields or setting field order, names etc. I had to write them directly
   into the db by creating the entries manually.
 * Best regards
    Micky
 *  Plugin Author [Vsourz Digital](https://wordpress.org/support/users/vsourz1td/)
 * (@vsourz1td)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/db-exclude-fields/#post-10533520)
 * Hello [@lacabriole](https://wordpress.org/support/users/lacabriole/),
 * There is no such provision to exclude the full form submission to the database.
 * We will check into the identical case of yours, but according to us, it might
   be some other issue.
 * If you have cloned the original site then, the functionality must work according
   to the settings set in the original site. Then you can alter the changes in the
   cloned site. if still, you have an issue, you can share your site link at [mehul@vsourzltd.com](https://wordpress.org/support/topic/db-exclude-fields/mehul@vsourzltd.com?output_format=md)
 *  Thread Starter [laCabriole](https://wordpress.org/support/users/lacabriole/)
 * (@lacabriole)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/db-exclude-fields/#post-10533605)
 * Tanks again for the answer,
 * the two sites are identical (real clones) in technical terms ( same virtual host,
   same WP installation, same theme, same child theme and custom pages, same plugins,
   same custom functions, etc,) and they were cloned before I installed the db-plugin…
   
   but no problem. As I said, I created the entries manually and they don’t have
   to change.
 * you may close the topic.
    regards Micky
 *  Plugin Author [Vsourz Digital](https://wordpress.org/support/users/vsourz1td/)
 * (@vsourz1td)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/db-exclude-fields/#post-10570922)
 * Hello Micky,
 * You would be glad to know that we have provided filters before saving the data
   to the database.
 * You can find the example in the FAQ section, in addition, we have also provided
   the filter for restricting certain form saving to our DB.
 * Hope you will enjoy the new features.
 * Regards,
    Vsourz
 *  Thread Starter [laCabriole](https://wordpress.org/support/users/lacabriole/)
 * (@lacabriole)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/db-exclude-fields/#post-10571006)
 * Thank you very much for the info
 * Regards
    Micky

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘db – exclude fields’ is closed to new replies.

 * ![](https://ps.w.org/advanced-cf7-db/assets/icon-256x256.jpg?rev=1696186)
 * [Advanced Contact form 7 DB](https://wordpress.org/plugins/advanced-cf7-db/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-cf7-db/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-cf7-db/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-cf7-db/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-cf7-db/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-cf7-db/reviews/)

## Tags

 * [exclude fields](https://wordpress.org/support/topic-tag/exclude-fields/)
 * [filter fields](https://wordpress.org/support/topic-tag/filter-fields/)

 * 6 replies
 * 2 participants
 * Last reply from: [laCabriole](https://wordpress.org/support/users/lacabriole/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/db-exclude-fields/#post-10571006)
 * Status: resolved