PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

How to pass value of multiple checkbox via query string?

  1. I need to get the value of multiple checkboxes via query string, depending on what the user selects, I only want to pass their selection on after the form is submitted. I've tried doing this Whatprocessormessage__c={Punchout:35.1}{Purchase Order:35.2}{Invoice:35.3}{ASN:35.4}{PO Acknowledgement:35.5}

    to see if anything would stick, but nothing came through.

    Posted 13 years ago on Friday October 22, 2010 | Permalink
  2. You use the confirmation redirect functionality and then the interface it provides to build your querystring. You would probably want to pass each checkbox as a separate item in your querystring.

    Ex.

    checkbox1={My Field:ID}&checkbox2={My Field:ID}&checkbox{My Field:ID}

    Be sure to use the insert form field drop down to insert the form field variables so that they have the correct ids.

    Posted 13 years ago on Friday October 22, 2010 | Permalink
  3. jimkrill
    Member

    Yes, but the problem with this is that it creates empty variables. And salesforce.com has issues when you try to pass empty variables.

    This worked for me when trying to create a query string to send to salesforce's web-to-lead form. I had to create the same name for each checkbox, in other words:

    &checkboxgroup={checkbox:8.1}&checkboxgroup={checkbox:8.2}... etc.

    And this worked to fill what should have been a multiselect drop-down menu (a multi <select> element)... except it only worked if all checkboxes were ticked.

    If one was left empty, than that value was "" - blank, and therefor threw an error in Salesforce.

    it seems like there should be a way to include a single array form field value from the multiple checkboxes for a single item in the query string.

    Posted 13 years ago on Tuesday January 18, 2011 | Permalink
  4. chadclubb
    Member

    Has anyone found a solution to this issue? I've searched far and wide to no avail. Please contact me if you have any ideas.

    Posted 13 years ago on Tuesday March 15, 2011 | Permalink