• Resolved crm2018

    (@crm2018)


    Please note this question is not about checkbox lists (which I know is not supported). This is about a single checkbox field and being able to correctly pass the value of 1 or 0 through to Salesforce. Each of the checkbox options on the form is a separate checkbox custom field in Salesforce.

    On the form, the fields are checked off by default, but I want them unchecked by default. If i set value to 0 so that it shows up unchecked on the webpage, when I then check the field on the form it still syncs to SFDC with a value of 0.

    Here is a link to my current setting. This is for the custom checkbox field called “August”.
    https://drive.google.com/file/d/1Ne13N_lfJRMJluXuUXtzvRJBqQfzEMZ7/view?usp=sharing

    Thanks!

    The page I need help with: [log in to see the link]

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

    (@nickciske)

    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.

    Thread Starter crm2018

    (@crm2018)

    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.

    Plugin Author Nick Ciske

    (@nickciske)

    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.

    Thread Starter crm2018

    (@crm2018)

    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.

    Plugin Author Nick Ciske

    (@nickciske)

    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

    Thread Starter crm2018

    (@crm2018)

    Nick,

    • This reply was modified 7 years, 6 months ago by crm2018.
    Plugin Author Nick Ciske

    (@nickciske)

    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/

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Regular Checkbox Sync Issues’ is closed to new replies.