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

    (@brilliantplugins)

    Your checkbox must have a value parameter or it will be auto checked as nothing = no value.

    1 is the value you want to use for a checkbox. You would not put anything in the options parameter.

    Thread Starter mischa89

    (@mischa89)

    Thank you for the quick reply!

    Unfortunately I’m still seeing it come through pre-checked.

    This is what I had set when I just tested it:

    Value: 1

    Options:

    Any thoughts on what might be causing that?

    https://photos.app.goo.gl/31aC72S4QvKCm7ze7

    Plugin Author brilliantplugins

    (@brilliantplugins)

    As in prechecked in the browser or checked in the Salesforce lead record?

    That is the proper setup and should function as expected.

    If you can provide an example form showing the issue in the browser, we can take another look.

    If you have a misconfiguration on the Salesforce side, that’s outside the scope of free support as the plugin is functioning as expected and we’re not Salesforce support.

    Thread Starter mischa89

    (@mischa89)

    It’s coming up prechecked in the browser. I have it implemented as a test here at the moment on the bottom of the form: https://www.cask.com/contact/

    Or did you mean another way of providing an example form?

    Note that I have a workaround implemented for the opt-in at the moment with a dropdown picklist, but I’d much rather have it as a checkbox.

    • This reply was modified 1 year, 3 months ago by mischa89.
    Plugin Author brilliantplugins

    (@brilliantplugins)

    <input type="checkbox" id="sf_Text_Opt_In__c" class="w2linput checkbox" name="Text_Opt_In__c" value="" checked="checked">

    That’s what I’m seeing in the page source code of the URL you provided — the missing value attribute is the issue.

    Testing locally using a checkbox with a value of 1 works as expected.

    If you have another plugin or code manipulating the form, that could explain things, but from what I can see, that field is not configured correctly.

    Thread Starter mischa89

    (@mischa89)

    Ok, that makes sense. I’m guessing there must be some code manipulating the form, as I have 1 entered and saved in the form editor. And even if I test other values or characters, nothing pushes through to the html code and it always shows value=””. I’ll see if I can find something on the backend, but I’m assuming that there might be old code that always checks a checkbox from when we had a different checkbox in the past.

    Thank you for you help!

    Plugin Author brilliantplugins

    (@brilliantplugins)

    Also check for caching plugins — the form code may be cached with the old valueless checkbox.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Checkbox is Pre-Checked by Default’ is closed to new replies.