checkbox value

Home Forums Quform WordPress checkbox value

This topic is: not resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #32602

    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.

    #32604
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    • This reply was modified 3 years, 1 month ago by Ally.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy