SOLVED

Re: Forms - selecting a limited number of options

Go to solution
Mrigesh_Gaurav
Level 1

Re: Forms - selecting a limited number of options

This is so much helpful. We are going to try it out. Thank you!

Ravi_Ansal2
Level 6

Re: Forms - selecting a limited number of options

Hi Sanford Whiteman​,

I was trying to embed this code but stuck with the cssselectors.

cssSelector: '#IsTestContact__c, #Email_was_deleted__c, #ContactReq__c',

Please let me know how to find the Css Selectors in my form. Below is the form i have restrict leads to select not more than 3 options.

<script src="//app-sj04.marketo.com/js/forms2/js/forms2.min.js"></script>

<form id="mktoForm_1845"></form>

<script>MktoForms2.loadForm("//app-sj04.marketo.com", "023-STC-548", 1845);</script>

Thanks is advance.

SanfordWhiteman
Level 10 - Community Moderator

Re: Forms - selecting a limited number of options

On that particular form the checkboxes are:

     INPUT[type="checkbox"][name="veniceRMUSuggestedTopics"]

Ravi_Ansal2
Level 6

Re: Forms - selecting a limited number of options

Thanks Sanford Whiteman​, It worked

SanfordWhiteman
Level 10 - Community Moderator

Re: Forms - selecting a limited number of options

Can I get a Correct Answer?

Ravi_Ansal2
Level 6

Re: Forms - selecting a limited number of options

Hi Sanford Whiteman​,

I cant do that. I just posted my question in the thread. But surely request James Glavin to do so.

Thanks For the Help!!

Thomas_Belnap
Level 1

Re: Forms - selecting a limited number of options

If you don't specify the name, will it set the limitation across all fields with checkboxes?

SanfordWhiteman
Level 10 - Community Moderator

Re: Forms - selecting a limited number of options

The checkbox groups are dictated by standard CSS selectors, so you can create any groupings you want. You do need to have an entry in the checkboxGroups array for each group.

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

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