• Resolved ManyCurrents

    (@jacobbarnett)


    Arshid – Thank you for your fast and specific reply; however, I do not understand how to implement your recommendation, “Try with cfdb7_before_save_data filter”, in order to exclude fields:
    [file* file-645 limit:6000000]
    [file file-837 limit:6000000]

    from contact forms 7 on form, from the CFDB-7 table:
    [contact-form-7 id=”4039″ title=”Send Documents”]

    I do understand I need to modify: contact-form-cfdb-7.php; however I am not finding how to:
    1. Write a filter to accomplish this
    2. Insert the filter code into contact-form-cfdb-7.php.
    I did read associated readme.txt and searched https://ww.wp.xz.cn/search/contact-form-cfdb-7.php/?forums=1

    Could you kindly direct me to documentation on how to write this filter and apply it in CFDB-7?

    Thank you for your assistance!
    Best Regards, Jacob

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Arshid

    (@arshidkv12)

    Try as follows

    add_filter('cfdb7_before_save_data', 'cfdb7_filter_before_save');
    function cfdb7_filter_before_save($form_data){
    
     unset($form_data['your-field-name']);
      return $form_data;
    }

    Copy and paste above code in theme functions.php file.

    • This reply was modified 6 years, 9 months ago by Arshid.
    Thread Starter ManyCurrents

    (@jacobbarnett)

    Arshid – Thank you for your fast reply!

    I see the solution you recommend above DOES remove the designated field from the reply form MESSAGE.

    However, I would like to INCLUDE the field data in the reply form message and EXCLUDE it from the CFDB-7 database report, associated with the forms appearing on the CFDB-7 “Contact Forms List”.

    I am seeking a way to avoid storing attached files on our server in the public ../wp-content/uploads/cfdb7_uploads/ directory.

    Thank You, Jacob

    Thread Starter ManyCurrents

    (@jacobbarnett)

    OK. Thinking this through further, changing the permissions for directory:
    ../wp-content/uploads/cfdb7_uploads

    to: 750 (-rwxr-x—) appears to hide uploaded uploaded contents from public view and addresses my original question.

    Best Regards ~:~ Jacob

    Thread Starter ManyCurrents

    (@jacobbarnett)

    Arshid – Thank you for your assistance!

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

The topic ‘Contact Form CFDB7: Exclude Form Fields From CFDB7 Database’ is closed to new replies.