Support » Plugin: Contact Form 7 Database Addon - CFDB7 » Acceptance Field

  • Resolved InDzine Steve

    (@steveindzine)


    A couple of questions:

    1. Can the contents of the acceptance field be stored rather than a binary true/false? It would be much better to see what was accepted.

    2. Is it possible so only store the data when someone has accepted? I want to make the acceptance field optional, so all it does is send the data if not accepted, but stores it if it is accepted.

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

    (@valuewordpress)

    Hey. My question fits here, too: Is it possible to block the saving of data by some forms? Can just only some forms save data?

    Plugin Author Arshid

    (@arshidkv12)

    Please try with following code. Paste code in your theme functions.php

    function cfdb7_chech_wpcf7_before_send_mail($form_tag){
        $form_post_id = $form_tag->id();
        if($form_post_id == 12 ){
          remove_action( 'wpcf7_before_send_mail', 'cfdb7_before_send_mail',10 );
        }
    }
    
    add_action('wpcf7_before_send_mail','cfdb7_chech_wpcf7_before_send_mail',9);

    Change $form_post_id == 12 with contact form ID.

    • This reply was modified 2 months ago by  Arshid.
    galinaivvn

    (@galinaivvn)

    Hi, @arshidkv12,
    This code is for storing acceptance only or accept and decline?

    Plugin Author Arshid

    (@arshidkv12)

    Above code is not field. Save features is disabled for particular form (based on form ID).

    Please check acceptance or decline field addon https://ciphercoin.com/downloads/acceptance-field/

    Thanks

    • This reply was modified 1 month, 4 weeks ago by  galinaivvn.

    Thanks for the code. But in the Child theme functions.php it creates code on the surface of my theme and in the spacious pro css it let’s my site crash.
    Any other idea?

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.