Passing checkbox value to Salesforce from Contact Form 7 – Contact Form 7 – Salesforce CRM Integration Plugin

Today I was using a Contact Form 7 to Salesforce integration plugin from obtaincode.net that I found on code canyon: https://codecanyon.net/item/contact-form-7-salesforce-crm-integration/20100042?s_rank=3

The issue that I had was that the default way that Contact Form 7 (CF7) creates checkboxes returns the label value when you transmit the field. So, if you are trying to connect to a checkbox field in Salesforce, it doesn’t work. To write the checkbox field from CF7 to Salesforce, you have to send a value of “1” to show the box as checked.

To do this, you need to manually add the label html around the shortcode that Contact Form 7 creates for the checkbox, and set the value as “1”:

<label id="sublabel" for="newsletterbox"> 
[checkbox newslettersub id:newsletterbox "1"] 
Yes, subscribe me to your newsletter.</label>

Unfortunately, this will show the value “1” as well as the label. So you will need to hide it:


#newsletterbox .wpcf7-list-item-label { visibility:hidden;}

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *