Required Fields with Forms 2.0 | Community
Skip to main content
February 4, 2014
Question

Required Fields with Forms 2.0

  • February 4, 2014
  • 8 replies
  • 2076 views
How do you modify the new Forms 2.0 to remove the required field asterisk?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

8 replies

February 4, 2014
The asterisk for required fields is a well established standard even when a form mentions "all fields are required".

The asterisk can be added/removed through custom CSS such as

span.form-required {
  display: none;
}
 
or
 
span.form-required {
   display:none !important;
}

Please test before posting into production.
 


February 4, 2014
In the Custom CSS for the form, I used:

.mktoAsterix {
    display: none !important;
  }
February 18, 2014
Thanks for the code Diederik!
February 19, 2014
Does anyone have CSS code that would put the asterisk to right of the field value?
February 19, 2014
Have you tried:

.mktoAsterix {
    float:right !important;
  }


Didn't have time to test it though.
February 19, 2014
Diederik, That did the trick! thanks so much for your help!
Cecile_Maindron
Level 10
May 7, 2014
and is there a code to remove the asterisk on just one field (cosmetic reason) but not the others? ;)
I could manually add an * other I don't know how to make it red and rest of label text black...
May 8, 2014
Normally you could specify it by using:

.mktoAsterix .defineherestyleofspecificfield {
    display: none !important;
  }


However Marketo uses for="phone" which is not something you can address. So in your case I would just hide all asterixes and add them again fo rthe fields you want.

To get it red you want want to tru to put this in the form editors label field:

Phone <span style="color:red;">*</span>

Not sure if it works though.