Skip to content

Instantly share code, notes, and snippets.

View gicolek's full-sized avatar

Rafał Gicgier - Certified Codeable Expert Developer gicolek

View GitHub Profile
@gicolek
gicolek / cf7-template-yellow.css
Created May 21, 2025 12:01
Contact Form 7 Template Yellow
/** this part of the code makes the background of our template yellow **/
.c-custom-template-wrap--yellow .wpcf7-form-control-wrap input,
.c-custom-template-wrap--yellow .wpcf7-form-control-wrap textarea,
.c-custom-template-wrap--yellow .wpcf7-submit {
background-color: #ffffd5;
color: black;
}
/** this part of the code, divides the HTML elements into two groups **/
.c-custom-template-wrap .c-custom-template {
@gicolek
gicolek / cf7-template-blue.css
Last active May 21, 2025 12:00
Contact Form 7 Template Blue
/** this part of the code makes the background of our template blue **/
.c-custom-template-wrap--blue {
background-color: #338cd0;
padding: 20px;
border-radius: 20px;
}
/** this part of the code, divides the HTML elements into two groups **/
.c-custom-template-wrap .c-custom-template {
display: grid;
@gicolek
gicolek / cf7tpl.html
Last active May 21, 2025 11:26
Contact Form 7 Template
<div class="c-custom-template-wrap c-custom-template-wrap--blue">
<div class="c-custom-template">
<div class="c-custom-template__col">
<label> Your name
[text* your-name akismet:author autocomplete:name] </label>
<label> Your email
[email* your-email akismet:author_email autocomplete:email] </label>
</div>
<div class="c-custom-template__col">
@gicolek
gicolek / gf_country_location.php
Last active February 24, 2025 13:39
Gravity Forms Country Geolocation
<?php
add_action( 'gform_after_submission', 'gf_set_country_field_value', 10, 2 );
/**
* Set the field value of the user country field
*
* @hook gform_after_submission
**/
function gf_set_country_field_value( $entry, $form ) {
$ip = rgar( $entry, 'ip' );
@gicolek
gicolek / contact_form_7_grid.css
Created July 1, 2024 21:31
Contact Form 7 Grid CSS
.c-grid {
display: grid;
grid-template-columns: 50% 50%;
gap: 10px;
}
.c-grid--three {
grid-template-columns: 33% 33% 33%;
}
@gicolek
gicolek / contact_form_7_grid.html
Created July 1, 2024 21:30
Contact Form 7 Grid CSS
<div class="c-grid">
<div>
<label> Name*
[text* your-name akismet:author autocomplete:name] </label>
</div>
<div>
<label> Email*
[email* your-email akismet:author_email autocomplete:email] </label>
</div>
</div>
@gicolek
gicolek / cf_7_styled_labe.css
Last active July 2, 2024 09:54
Contact Form 7 Label
.wpcf7-styled {
padding: 25px;
background: #fafafa;
border-radius: 25px;
}
.wpcf7-styled .wpcf7-radio input[type="radio"] {
display: none;
opacity: 0;
}
@gicolek
gicolek / contact_form_7_background_border.css
Created July 1, 2024 21:27
Contact Form 7 Background and Border
.wpcf7-styled {
padding: 25px;
background: #fafafa;
border-radius: 25px;
}
@gicolek
gicolek / contact_form_7.html
Created July 1, 2024 21:26
Contact Form 7 Headings
<h4> About You </h4>
<label> Name*
[text* your-name akismet:author autocomplete:name] </label>
@gicolek
gicolek / styled_cf7.html
Last active July 2, 2024 07:52
Styled Contact Form 7 CSS
<!-- Contact Form 7 Markup -->
<h4> About You </h4>
<div class="c-grid">
<div>
<label> Name*
[text* your-name akismet:author autocomplete:name] </label>
</div>
<div>
<label> Email*
[email* your-email akismet:author_email autocomplete:email] </label>