I'm building an API Integration with a Wordpress Plugin that forwards from's data to CRM's API.
I've got it working on Contact Form 7 by adding an action after 'wpcf7_submit'.
// wpcf7_submit available since ContacForm7 4.1.2, testes with 4.4
add_action("wpcf7_submit", "crm_forward_cf7_to_crm", 10, 2);
function crm_forward_cf7_to_crm($form,$result) {
// TODO has spam been filtered already?
// TODO has form been validated already?
$submission = WPCF7_Submission::get_instance();
if ( $submission ) {
$posted_data = $submission->get_posted_data();
$posted_data = crm_filter_cf7_data($posted_data);
crm_post_form($posted_data);
}
};
My questions are:
Has this submission been filtered out by spam validation (e.g.: akismet) at this point?
Has CF7 validated this form at this point?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire