Skip to main content
Level 2
May 21, 2026
Solved

Marketo Form - "Select up to two" answer options possible?

  • May 21, 2026
  • 1 reply
  • 26 views

On a Marketo form, is there a way for me to use the checkboxes field type, but limit the number of boxes someone can check? For example, I have a list of 10 checkbox options on a form field, but I don’t want people to select more than two. Is there a rule I can set up to make this possible?

    Best answer by SanfordWhiteman

    Wow, that’s old! Still works but there’s a much later version without the old IE8 compatibility chaff:

     

    This version lets you set min and max checked among a set of checkboxes, and even works across different Checkbox or Checkboxes fields. (That is, you can set a max of 2 sub-values in a multivalued field, or a max of 2 values in different fields, or any combo.)

    1 reply

    Crystal_Pacheco
    Level 4
    May 21, 2026

    I found a solution ​@SanfordWhiteman posted 10 years ago! You’ll need to set it up with javascript.
     

    Demo here: MktoForms2 :: Checkboxes Max Checked

     

    Related (but not completely congruent) discussion here: https://nation.marketo.com/message/107000#comment-107000

    Crystal_Pacheco
    Level 4
    May 21, 2026

    Demo here: MktoForms2 :: Checkboxes Max Checked

     

    Related (but not completely congruent) discussion here: https://nation.marketo.com/message/107000#comment-107000

     

    If all the fields are all within a Checkboxes field you can target them like:

    LABEL[for="YourFieldName__c"] ~ .mktoCheckboxList INPUT[type="checkbox"]

     

    Source: 

     

    SanfordWhiteman
    SanfordWhitemanAccepted solution
    Level 10
    May 21, 2026

    Wow, that’s old! Still works but there’s a much later version without the old IE8 compatibility chaff:

     

    This version lets you set min and max checked among a set of checkboxes, and even works across different Checkbox or Checkboxes fields. (That is, you can set a max of 2 sub-values in a multivalued field, or a max of 2 values in different fields, or any combo.)