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

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
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)?

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.

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.