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 8 years ago by
Arshid.
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 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?