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

Catherine_Dalm2
Level 2

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

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?

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

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

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

Catherine_Dalm2
Level 2

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

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

SanfordWhiteman
Level 10 - Community Moderator

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

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.