Checkboxes can only pass a value or nothing. They cannot pass 0 s that’s… nothing.
If not checked, the browser doesn’t even pass that field in the POST data – no matter what the value is set to.
If you set a checkbox value to 0 or (aka a blank string… like you have) it will be checked by default as 0 = unset to the browser thus 0 = 0 so it checks the box. A checkbox with no value is not a valid checkbox and will never be sent anywhere.
Set the value to 1 or a string (e.g. August) and it should not be checked by default… and send data to Salesforce when the user checks it.
Which you choose depends on what SF is expecting for that value/ what the data type is on the SF side.
Hi Nick,
I tried what you suggested and it still doesn’t work.
See screenshot here for what I did:
https://drive.google.com/file/d/11ikYwIbyrzKia5Pr_VVQXeR9eF_hBuR1/view?usp=sharing
Yes, when I add a value to the field setup, it does show the field as unchecked on the website. BUT, when I check the field on the form is still passes a BLANK value to SFDC upon submission.
Any idea why this is happening?
Thanks.
What kind of field is X2018__C?
I can assure you that something is being sent to SF. If that’s not what’s it’s expecting, it may appear nothing was sent… but appearances can be deceiving.
Generating a web form in Salesforce can be useful to see what value SF expects to be sent for a field. The FAQ has more details about which fields require internal IDs vs the human readable label.
Hi Nick,
X2018__C is a checkbox.
As you suggested, I’ve tried the field label, the field name and the field API. Nothing works.
As a side note, I already pass a hidden checkbox field called “web lead 2” with no problem that has a value of 1, so I know the field setup is correct (see image):
https://drive.google.com/file/d/1sLLzHzFm8zWQy3ua4mbKnH1Lh761PlmY/view?usp=sharing
Do you have any idea why your plugin isn’t working for all the other fields?
Thanks.
X2018__c no X2018__C is the API name. Have you tried it with the case matching what Salesforce?
I just set up a new checkbox lead field called X2018 which has the API name of X2018__c.
Added a new field to a new form with X2018__c as the name. Set the value to 1.
It starts unchecked and transfers to Salesforce as expected when checked and submitted.
https://tppr.me/efAHX
Why is this so hard? Salesforce makes it harder than it needs to be, unfortunately.
As far as I can tell this is a configuration issue and not a plugin issue.
If you’d like assistance with your site, that falls under premium support:
https://luminfire.com/support/premium-plugin-support/