Removing the (required field) asterix from an embedded form | Community
Skip to main content
July 9, 2015
Solved

Removing the (required field) asterix from an embedded form

  • July 9, 2015
  • 1 reply
  • 3004 views

I have embedded a simple Marketo form on our website - it's for newsletter sign-ups so has only one field: email address.

Email is a required field. When I embed it on our site the red asterix (indicating required) is visible which looks odd on an embedded single field form.

Any idea how to remove or not display the asterix (and keep the field as required)? Here's the code:

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

<form id="mktoForm_1069"></form>

<script>MktoForms2.loadForm("//app-lon03.marketo.com", "586-GPD-762", 1069);</script>

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

You need

.mktoForm .mktoRequiredField .mktoAsterix {

     display: none;

}

because of CSS selectivity rules.

1 reply

July 9, 2015

The following CSS will hide it:

.mktoAsterix { display: none; }

July 10, 2015

Thanks Luke. I tried that (see screen shot below) but it has not removed the asterix.

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
July 10, 2015

You need

.mktoForm .mktoRequiredField .mktoAsterix {

     display: none;

}

because of CSS selectivity rules.