Beautiful Marketo Forms: Styling Checkboxes and Radio Buttons

In:

Your Marketo forms don’t have to be boring. With a little extra CSS you can create beautiful Marketo forms with customized checkboxes and radio buttons. In this tutorial, I’ll show you how you can style checkboxes and radio buttons within Marketo forms with minimal coding.

Before we begin…

Let’s refresh on how to add custom CSS to your Marketo forms.

Navigate to the form and open up the form editor. Click on Form Settings > Form Theme > Edit Custom CSS this is where you can paste in your own CSS.

marketo-form-styling-edit-custom-css

Marketo requires that you select one of their themes to start. Changing themes will affect the CSS. For this tutorial, I will be using the “simple” theme which is the default theme when you create a new form.

marketo-form-theme-settings

Note: If you don’t select the “simple” theme for your form this tutorial won’t be copy & paste.

Styling Checkboxes

One of the downsides of using Marketo forms is the inability to modify the HTML structure of the form, so I will be leveraging the standard Marketo HTML to style the checkboxes.

The HTML

The standard HTML for a checkbox in a Marketo form looks like this:

Notice how the all the checkboxes are wrapped in a DIV with the class mktoCheckboxList? This is how we will target the checkbox input and the checkbox label within the CSS.

The CSS

For the CSS, FontAwesome will be loaded to display the checkmark for the checkbox. The default checkbox will be hidden and the ::before selector will be used to style the new checkbox.

The Result

The styled checkboxes will look like this once the CSS has been added to the Marketo form.

See the Pen Marketo Customized Checkboxes Using CSS (option 1) by Jenna Molby (@jennamolby) on CodePen.

Styling Radio Buttons

Styling radio buttons are pretty similar to the checkboxes, but with a bit of extra CSS to make them look like a radio button. Just like the checkboxes, we will leverage the HTML that Marketo provides, so all you have to do is add some CSS.

The HTML

All radio buttons in the Marketo form are wrapped in a DIV with the class mktoRadioList. This is how we will target the radio input and the radio label within the CSS.

The CSS

Just like the CSS for the checkboxes, FontAwesome will be loaded to display the checkmark for the radio button and the default radio button will be hidden.

The Result

See the Pen Marketo Customized Radio Buttons Using CSS (option 1) by Jenna Molby (@jennamolby) on CodePen.

Special thanks to Karen Menezes who wrote a great tutorial on pure CSS checkboxes, which I referenced to make this Marketo tutorial.

Questions?

Send them to me via email, send me a tweet @jennamolby, or leave a comment

Related Posts

  • 05/07/2017
    Make Your Marketo Forms More User-Friendly With This Tip

    I was registering for a webinar this week and when I went to select my Country from the drop-down, I was greeted with a search feature for the drop-down. I immediately started Googling what JavaScript plugin they were using to see if I could use it on Marketo forms. It turns out, you can and not only is it super easy to implement, but it also makes long drop-down in your Marketo forms more user-friendly. I’ll walk you through how I did this in 4 easy steps.






  • 27/10/2016
    How to Create a 2 Column Pardot Form

    After launching my Form Style Generator for Pardot Forms, the number one question I receive is ‘how do I create a 2 column form in Pardot?’ I might update the style generator to include this in the future, but in the meantime, here’s how to create a 2 column Pardot form with minimal coding.






  • 23/08/2016
    How to Improve Pardot Form Conversions by Using Google Places

    It’s a fact that shorter forms have a higher conversion rate, but in B2B marketing longer forms are needed to capture essential information for lead scoring and lead routing. In this tutorial, I will show you how to use the Google Places API to auto-fill city, state/province, country and postal code/zip code within your Pardot forms. Don’t worry, you don’t need to know how to code to implement this, you just need to know how to copy & paste.






Leave A Comment

Your email address will not be published. Required fields are marked *

About Me

I’m a Marketing Operations Manager and Marketo Certified Expert who is passionate about front-end development, web design, data, and email marketing. LEARN MORE

Categories
Most Commented
Popular Posts