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 that I found on code canyon:

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 *

Captcha loading...