Required Fields with Forms 2.0

Anonymous
Not applicable

Required Fields with Forms 2.0

How do you modify the new Forms 2.0 to remove the required field asterisk?
Tags (1)
8 REPLIES 8
Anonymous
Not applicable

Re: Required Fields with Forms 2.0

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.
 


Anonymous
Not applicable

Re: Required Fields with Forms 2.0

In the Custom CSS for the form, I used:

.mktoAsterix {
    display: none !important;
  }
Anonymous
Not applicable

Re: Required Fields with Forms 2.0

Thanks for the code Diederik!
Anonymous
Not applicable

Re: Required Fields with Forms 2.0

Does anyone have CSS code that would put the asterisk to right of the field value?
Anonymous
Not applicable

Re: Required Fields with Forms 2.0

Have you tried:

.mktoAsterix {
    float:right !important;
  }


Didn't have time to test it though.
Anonymous
Not applicable

Re: Required Fields with Forms 2.0

Diederik, That did the trick! thanks so much for your help!
Cecile_Maindron
Level 10

Re: Required Fields with Forms 2.0

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...
Anonymous
Not applicable

Re: Required Fields with Forms 2.0

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.