This topic is: not resolved
- This topic has 1 reply, 2 voices, and was last updated 4 years, 2 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forums › Quform WordPress › checkbox value
Hello,
I am sending the form data to my cms using this code:
add_action(‘quform_post_process_2’, function (array $result, Quform_Form $form) {
$data = array(
‘token’ => ‘mytoken id’,
‘last_name’ => $form->getValue(‘quform_2_6’),
‘first_name’ => $form->getValue(‘quform_2_33′),
’email’ => $form->getValue(‘quform_2_10’),
‘country’ => $form->getValue(‘quform_2_20’),
‘company’ => $form->getValue(‘quform_2_7’),
‘job_title’ => $form->getValue(‘quform_2_29’),
‘Industry’ => $form->getValue(‘quform_2_34’),
‘Interested_In’ => $form->getValue(‘quform_2_35’),
‘Email_Opt_In’ => $form->getValue(‘quform_2_19’),
‘phone’ => ‘0’,
// ‘mobile’ => ‘0’,
‘message’ => ‘0’,
‘lead_source’ => ‘Brochure-form’,
‘lead_status’ => ‘Initial Mail’,
);
wp_remote_post(‘http://domain.com/api/create’, array(
‘body’ => $data,
));
return $result;
}, 10, 2);
on this form I have a checkbox that I want to send to value: ture or false in case the user check it or not.
how can I do that? at the moment it is not sending these values.
the checkbox element is this one:
‘Email_Opt_In’ => $form->getValue(‘quform_2_19’),
thanks.
You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.