Skip to content

Instantly share code, notes, and snippets.

@landru247
Created April 2, 2014 16:55
Show Gist options
  • Save landru247/9938240 to your computer and use it in GitHub Desktop.
Save landru247/9938240 to your computer and use it in GitHub Desktop.
Contact Form 7: validation - removes the error/success message and removes the default field validation and replaces with colored fields
div.wpcf7-response-output, div.wpcf7-validation-errors { display: none !important; }
span.wpcf7-not-valid-tip { display: none; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: red; background-color: rgba(153,0,0,0.3); }
@brynzovskii
Copy link

Nice!

@redlion57
Copy link

redlion57 commented Feb 23, 2017

This works great alone but how can I combine with this code?
thanks

.wpcf7-text, .wpcf7-textarea, .wpcf7-captchar {
background-color: #eee !important;
border: none !important;
width: 100% !important;
-moz-border-radius: 0 !important;
-webkit-border-radius: 0 !important;
border-radius: 0 !important;
font-size: 14px;
color: #999 !important;
padding: 16px !important;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.wpcf7-submit {
color: #2EA3F2 !important;
margin: 8px auto 0;
cursor: pointer;
font-size: 20px;
font-weight: 500;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
padding: 6px 20px;
line-height: 1.7em;
background: transparent;
border: 2px solid;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-moz-transition: all 0.2s;
-webkit-transition: all 0.2s;
transition: all 0.2s;
}
.wpcf7-submit:hover {
background-color: #eee;
border-color:#eee;
padding: 6px 20px !important;
}

@saigonosenpai
Copy link

Works perfectly thanks <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment