Checkboxes are unchecked by default… but it has to have a value other than zero to display properly. A zero or blank value will never be sent to Salesforce and will always be checked.
Values of 1 are common for boolean (yes/no) fields, but depending on the use case anything other than 0 or (blank) will yield an unchecked checkbox.
In other words, the solution is put a random number other than 0 or 1 into the value field and the check box will show unchecked by default.
Hi everyone – thanks for the feedback! Unfortunately, I still can not get the data to pass through Salesforce.
I’ve put a value of “2” in the checkbox field, and the checkbox is showing unchecked on the website, which is great. However, when I check the box and submit the form, no data is passed for the checkbox. All other form data shows up as expected.
I’ve tested this with a new checkbox field and tried both the API name and ID.
Any suggestions on how to get the checked value to pass through?
Which checkbox field are you trying to populate?
Hi Nick,
The checkbox is at the bottom of the form here
Here’s a link to the checkbox settings: https://pasteboard.co/Hza1ZMU.png
Thank you for looking into this, I appreciate it!
Jen
-
This reply was modified 7 years, 10 months ago by
jenrstretch.
Why a value of 2? 1 should work.
As should your form as it is… assuming that is the correct name of a custom field in your organization…
Hi Nick,
When I used 1 the field was automatically checked, and I want it unchecked – so I put a value of 2 based on the comment above from @fernandolawl that it should be a value other than 0 or 1.
I do see your lead in Salesforce and the checkbox is checked. Oddly, I’ve tested is 4 times today and it is unchecked everytime in Salesforce, even though I’ve checked it on the form.
I’m using Firefox on a Mac. Any ideas?
Thanks!
I manually overrode the value of the checkbox to 1 before I submitted.
So the 2 is the issue.
Using 1 should not auto check it.