How do I create "headings" for section of checkboxes without them becoming field values? | Community
Skip to main content
October 26, 2015
Question

How do I create "headings" for section of checkboxes without them becoming field values?

  • October 26, 2015
  • 6 replies
  • 4450 views

I have a field in a form which are checkboxes. I want to separate the checkboxes into sections headed by a title for each section.

Well unfortunately, the "titles" for each section are automatically treated by Marketo as field values, with a checkbox beside it.

IS THERE ANY WAY I CAN GO INTO ADVANCED EDITOR AND DESIGNATE THESE HEADINGS SO THEY DON'T GET CALLED A FIELD???????

I have looked and looked through Marketo and, it is like a big mystery to get ANY ANSWER TO THIS.

Thanks. Sorry, I am a little frustrated.

Matt.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

6 replies

SanfordWhiteman
Level 10
October 26, 2015

What you're doing right now isn't exactly clear. But it sounds like you want a fieldset, then drag the checkboxes into the 'set. A fieldset is semantically "a group of related fields," not necessarily mutually exclusive but related, thus akin to a "section."

November 23, 2015

Hi Sanford,

The Fieldset is not helping.

What I have, is a single field, called "product of Interest". It has numerous checkbox values to choose from. I want to separate these checkbox values into groups with a heading atop each group. The problem is, I can't include a heading, without the heading also becoming a checkbox value. How the heck do I put in a text value without it automatically getting changed into a dog-gone checkbox???? Or is Marketo that limited? The attached image is an example of what I want it to look like. Is there anyone who can answer this? Or is the answer "It is impossible in Marketo"? Thanks!

Level 10
November 23, 2015

You can achieve this by writing custom js. Add a progressive class with every checkbox and then add the text using before or after event on particular class. Here is the sample code to add the progressive class on the checkbox   MktoForms2.whenReady(function (form){     var class_count = 1;     $("input[type='checkbox']").each(function(){     $(this).addClass("label"+class_count );     class_count ++;   });

November 23, 2015

Alok, where does one put this javascript? The advanced editor in the form doesn't let me add anything...it will just create another dang checkbox out of anything I put into it. Please see screenshot attached. I was hoping, I could just add some HTML or other code, that would tell the dang Marketo system that "no, I don't want a checkbox this time, I just want a headline!!!!!!!". But no, anything I put in there above "AlphaImager EC"... it will add a | and repeat it, and create another dang checkbox. In the form itself, there does not seem to be anywhere I can put any script. So is there some way I can accomplish this without having to obtain a pHD in computer science? Thanks you guys. Pulling my hair out on a simple issue.

Level 10
November 24, 2015

You can add this script on the LP in an HTML editor, There is no other way in marketo to accomplish your requirement without the custom code.

November 23, 2015

Can you use the Rich Text option? When you add a new field click the Rich text button, here you can add your titles and place them in the form where you want just like you can with a field.

Add a Rich Text to a Form - Marketo Docs - Product Docs

Level 8
November 23, 2015

That is exactly what I do Cathal, just add rich text above each section you want to separate.

Level 8
November 23, 2015

How about setting up different field sets with different titles but the same 'Field' and split the check boxes that way?  Would that work?

November 23, 2015

I really appreciate all of you trying to help. I tried setting up field sets, but Marketo only allows one field per field set. I set up one field set called "Instruments" and dragged the instruments checkboxes for "Product of Interest" into it. Then I tried to create another field set, but it would not let me use the "Product of Interest" field anymore.

This is such a simple thing request. There must be many people who want to "categorize" their checkboxes with headers. I don't understand why this has become such a nightmare.

November 23, 2015

I would like to reiterate my question. And thanks to all of you for taking the time to help.

All I want to do (see screenshot attached) is to have the first item " --Instruments-- " to NOT have that dang checkbox beside it. Thats it! That's ALLLLLLLL I need. If I could do that, then I could list the other section headings as --Software--, --Upgrades-- etc. and I would be done! Is there any hope to be able to accomplish this in Marketo?

Don't get me wrong, I love Marketo. When it works, it is fantastic. But when it doesn't...OH MY! It's a nightmare!

SanfordWhiteman
Level 10
November 24, 2015

Very simple.   CSS only, no JS:

    MktoForms2 :: Checkboxes with Sections - JSFiddle

Mark up the value list like so:

November 24, 2015

Where do I put the css? Is there somewhere in the form that allows me to put this css in there?

.mktoForm INPUT[type="checkbox"][value="[Section]"] {

    display: none;

}

Thanks,

Matt