css to hide required

  • Profile Image
    mitchbarney
    Asked on July 03, 2011 at 12:57 AM

    Can you show me the css to hide all indications that a field is required so the field does not turn red and has the note "This Field is Required"

  • Profile Image
    liyam
    Answered on July 03, 2011 at 04:41 AM

    Hello mitchbarney,

    You would like for a required field to not show the asterisk sign to be hidden and as well as the error message to be hidden but not the functionality of the error, am I correct?

    If so, try injecting this CSS:

    .form-error-message {
    display: none !important;
    }
    .form-line-error {
    background-color: transparent !important;
    }
    .form-required {
    display: none !important;
    }

    Let us know if this works on your form.

    Thanks,

    Liyam

  • Profile Image
    mitchbarney
    Answered on July 03, 2011 at 11:40 AM

    Hi Liyam,

    That is pretty close :)

    Can we also remove the red outline aound the required fields?

    Jason

  • Profile Image
    NeilVicente
    Answered on July 03, 2011 at 12:00 PM

    Hi,

    To answer in behalf of Liyam, this is the best I can come up with:

    .form-validation-error {
        borderthin inset #999999;
        box-shadownone;
    }
    Other members of our team could have a better solution though.

    Neil
  • Profile Image
    abajan
    Answered on July 03, 2011 at 01:26 PM

    Hi Jason

    Replace all of your injected CSS with the following:

    input,textarea,select {
    background-color: #F9FFB9;
    border:2px inset #EEE;
    }
    .form-required {
    color: white;
    }
    .form-line-error {
    background:none repeat scroll 0 0;
    }
    .form-error-message {
    display: none !important;
    }
    .form-validation-error {
    border:2px inset #EEE;
    -moz-box-shadow:none;
    -webkit-box-shadow:none;
    box-shadow:none;
    }

    Please let us know if this fits your requirements and if there's anything else related to your forms with which you need assistance. Our team will be glad to help where we can.

    Cheers


    ~ Wayne

  • Profile Image
    Focus7
    Answered on July 06, 2011 at 06:28 PM

    Hi Wayne,

     

    That works perfectly :)

     

    Jason

  • Profile Image
    abajan
    Answered on July 06, 2011 at 07:59 PM

    Glad we were able to help, Jason.

    ~ Wayne