Submit boolean value
Opened this issue · 1 comments
dkordic7 commented
Hi there. Thank you for an amazing plugin which I've been using for years.
I'm trying to create a CF7 integration with Brevo (formerly Sendinblue) and one of their fields, updateEnabled, is of boolean type. Is there a way to set a static value of "true", but to lose the quotation marks in the submission request?
Thank you in advance!
dkordic7 commented
Looks like I found a working solution:
function updateEnabled($post, $service, $form, $sid){
foreach($post as $key => $value)
if($key == "updateEnabled" && $value == "true")
$post[$key] = true;
return $post;
}
add_filter('Forms3rdPartyIntegration_service_filter_post_20', 'updateEnabled', 10, 4);