• Resolved jenrstretch

    (@jenrstretch)


    Hello,

    I’m a big fan of this plugin and use it across several sites. I’d like to add a checkbox to our forms with marketing (GDPR) opt-in language. By default, I need the box to be unchecked so the user checks it only if they’d like to opt in to marketing materials. I have tried a value of 1 and 0, but regardless, the data is not captured in Salesforce once I check the box on the web form.

    Screenshot of the field settings is here: https://i.imgur.com/YiD2eyi.jpg

    The screenshot shows 2 fields because I attempted to set it up with the API name as well as the ID.

    Please let me know what I’ve done wrong here.

    Thank you!!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Nick Ciske

    (@nickciske)

    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.

    Thread Starter jenrstretch

    (@jenrstretch)

    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?

    Plugin Author Nick Ciske

    (@nickciske)

    Which checkbox field are you trying to populate?

    Thread Starter jenrstretch

    (@jenrstretch)

    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 6 years, 3 months ago by jenrstretch.
    Plugin Author Nick Ciske

    (@nickciske)

    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…

    Thread Starter jenrstretch

    (@jenrstretch)

    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!

    Plugin Author Nick Ciske

    (@nickciske)

    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Checkbox not working’ is closed to new replies.