• Resolved marshallpickard

    (@marshallpickard)


    I would like to put a red border around my required checkboxes when they are not selected.

    I tried this css but nothing happens

    span .wpcf7-checkbox-not-valid
    {
    border: 2px solid #CE0000 !important;
    }

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Where in the form do you use the wpcf7-checkbox-not-valid class?

    Thread Starter marshallpickard

    (@marshallpickard)

    The checkboxes are set up as required. I have this written as css code in my site. This is the code

    /* Form Errors */
    span .wpcf7-not-valid {
    border: 2px solid #CE0000 !important;
    }

    span .wpcf7-checkbox-not-valid
    {
    border: 2px solid #CE0000 !important;
    }

    span.wpcf7-not-valid-tip {
    display: none !important;
    }

    div.wpcf7-validation-errors {
    background: #ffe2e2;
    border: 2px solid #CE0000 !important;
    width: 100% !important;;
    color: #CE0000 !important;
    font-family:’PT Sans’;
    font-size: 16px;
    }
    .wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.unaccepted .wpcf7-response-output {
    border-color: #CE0000;
    }
    div.wpcf7-response-output {
    font-family:’PT Sans’;
    font-size: 18px;
    background-color:#F0F0F0;
    line-height: 22px;
    margin-bottom: 2em !important;
    margin-top: 2em !important;
    padding: 15px!important;
    border-radius: 0px;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    }

    This is the form code:

    <label>[text* text-145 placeholder “First Name*”]</label>
    <label>[text* text-147 placeholder “Last Name*”]</label>
    <label>[email* email-584 placeholder “Email*”]</label>
    <label>[text* text-200 placeholder “City*”]</label>
    <label>[text* text-201 placeholder “State/Region/Country*”]</label>
    Please select one:
    [checkbox* checkbox-719 use_label_element “I am a student interested in more information” “I am a College or University interested in membership” “I am a Sponsor interested in sponsorship opportunities”]

    <label>[textarea* textarea-338 placeholder “How Can We Assist You?”]</label>

    [submit “Send”]

    Thread Starter marshallpickard

    (@marshallpickard)

    The class is used on the three checkboxes. They should become red if one is not checked.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Where does the idea come from? In reality no wpcf7-checkbox-not-valid class is used anywhere in the form.

    Thread Starter marshallpickard

    (@marshallpickard)

    OK. Since they were required, I thought they could have a red “error” border same as when a required text field is left blank. Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Checkbox Error Border’ is closed to new replies.