Can I create a cap on how many values can be picked for a multi-select? | Community
Skip to main content
Catherine_Dalm2
New Participant
June 12, 2020
Question

Can I create a cap on how many values can be picked for a multi-select?

  • June 12, 2020
  • 1 reply
  • 2773 views

I have a form on a landing page.  I am giving the lead the ability to multi-select for a particular field but I want to limit the amount of values that they can select.  The field has 40 values but I want to limit them to just pick 3.  Is there a way that I can do this?

1 reply

SanfordWhiteman
New Participant
June 12, 2020

Before I answer, you're using the true <select multiple> type (not checkboxes)?

Catherine_Dalm2
New Participant
June 17, 2020

Hi.  Yes, the field type on the form is select and I have multi-select checked.

SanfordWhiteman
New Participant
June 18, 2020

Like so:

 

MktoForms2 :: <select multiple> Min/Max Checked v1.0.0

 

Just put the code from the JS pane inside a <script>. On a Marketo LP, put it right before the closing </body>. If you're using the embed code, put it anywhere after the embed code.