Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gravity Forms Collapsible Sections - Custom Styles 3
.form-has-collapsible-sections_wrapper {
margin: 0;
text-align: right;
width: 100%;
max-width: none;
}
.form-has-collapsible-sections {
display: inline-block;
width: 520px;
max-width: 100%;
text-align: left;
position: relative;
}
.form-has-collapsible-sections .gsection.collapsible-sections-field {
margin-top: 12px !important;
margin-top:0px;
border-radius: 3px;
border-color: #d8d8d8;
padding: 16px 20px 16px 20px !important;
background: linear-gradient(to bottom, rgba(254,254,254,1) 0%, rgba(241,241,241,1) 100%);
box-shadow: 0 2px 7px rgba(0,0,0,.1);
}
.form-has-collapsible-sections .gsection.collapsible-sections-field:nth-child(1) {
margin-top: 0 !important;
}
.form-has-collapsible-sections .gsection.collapsible-sections-field .gsection_title {
padding: 0;
margin-top: 0;
border-radius: 0;
color: #8a9dab;
font-size: 14px;
background: transparent;
}
.form-has-collapsible-sections .gsection.collapsible-sections-field .gsection_title:after {
font-size: 14px !important;
color: #8a9dab;
}
.form-has-collapsible-sections .collapsible-sections-collapsible-body {
border: none;
padding-left: 0;
padding-right: 0;
}
.form-has-collapsible-sections .collapsible-sections-collapsible-body > .gfield:first-child,
.form-has-collapsible-sections .collapsible-sections-collapsible-body > .gfield:first-child .ginput_container {
margin-top: 0;
}
.form-has-collapsible-sections .validation_error {
margin-bottom: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
background: #b3304c;
}
.form-has-collapsible-sections .gsection.collapsible-sections-field.collapsible-sections-section-error {
border-color: #b3304c !important;
background-color: #fff;
}
.form-has-collapsible-sections .gsection.collapsible-sections-field.collapsible-sections-section-error + .collapsible-sections-collapsible-body .gfield_error input,
.form-has-collapsible-sections .gsection.collapsible-sections-field.collapsible-sections-section-error + .collapsible-sections-collapsible-body .gfield_error textarea,
.form-has-collapsible-sections .gsection.collapsible-sections-field.collapsible-sections-section-error + .collapsible-sections-collapsible-body .gfield_error select {
border-color: #b3304c;
color: #b3304c;
}
.form-has-collapsible-sections .gsection.collapsible-sections-field.collapsible-sections-section-error + .collapsible-sections-collapsible-body .gfield_error .gfield_label {
color: #790000;
}
/*
Find out more at
https://jetsloth.com/gravity-forms-collapsible-sections/
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment