Forums

Web 2 Lead form problem with checkbox

clinden 03 Jun, 2011
Hi

I am using chronoforms together with the curl plugin to send the data captured to zoho crm (web2lead). All my fields are currently mapped and all working perfect. Today I needed to add two new checkbox fields and mapp them in the curl plugin section with the corresponding field names in zoho.

After the changes nothing gets entered into zoho any longer, debug looks allright expect for the value of the checkboxes.

If I enter the curl plugin section and just remove the mapping all is fine. Any special changes I need to make to capture the checkbox values ?

Curl debug section
[check0] => Array ( [0] => Accommodation ) [check1] => Array ( [0] => Accommodation ) [title] => [last_name] => test [first_name] => Test [nickname] => John [Nationality] =>

check0 and check1 where both ticked in my form.

Please let me know if I can provide anymore information.

Thanks

//C
GreyHead 03 Jun, 2011
Hi clinden ,

If they are single value checkboxes (that is not part of a group) then they don't need to have array names. I think that this is the case here.

If they can have multiple values then you either need to convert them to strings before the plug-in runs*.

Bob

* Or, if you need to pass an array result, you can use my alternative version of the plug-in which will handle arrays correctly.
clinden 03 Jun, 2011
Hey

Yes this is two seperate single check boxes.
Example below for one checkbox
<div class="form_item">
  <div class="form_element cf_checkbox">
    <label class="cf_label" style="width: 150px;">Tour </label>
    <div class="float_left">
      <input value="Accommodation" title="" class="radio" id="check00" name="check0[]" type="checkbox" />
      <label for="check00" class="check_label">Accommodation</label>
      <br />
      

    </div>
    
  </div>



Cheers
GreyHead 03 Jun, 2011
Hi clinden,

Edit this line to remove the []
<input value="Accommodation" title="" class="radio" id="check00" name="check0" type="checkbox" />

Bob
clinden 03 Jun, 2011
Hi

Removed and edited the line and I can see that the checkbox gets populated in the debug screen after submission, but I am not getting the data across to zoho. No new entry is created if I remove the mapped fields then the new entry is created.

Cheers !

//C
clinden 04 Jun, 2011
If I just use plain checkboxes then the entry gets created and the checkboxes applied in zoho. Not sure if thsi is ok though.

<div class="form_item">
  <div class="form_element cf_checkbox">
    
Book Accommodation :<input type='checkbox' name='CONTACTCF110' /> 
<br>
Book Accommodation :<input type='checkbox' name='CONTACTCF104' /> 

    </div>
GreyHead 05 Jun, 2011
Hi clinden,

If it works then it's OK. I can't see why changing the name would make any difference though :-(

Bob
This topic is locked and no more replies can be posted.