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 / contact-form-two-col-layout.html
Created February 22, 2024 15:44
Contact Form 7 Two Column Layout
<div class="c-grid">
<div>
<label> Your name
[text* your-name] </label>
<label> Your email
[email* your-email] </label>
</div>
<div>
@gicolek
gicolek / gf_country_location.php
Last active December 19, 2025 09:00
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 / gfduplicate.php
Created November 4, 2025 14:21
Gravity Forms submit one form values to another form
<?php
add_action( 'gform_after_submission_n', 'wpdoin_after_submission_add_n_form_submission', 10, 2 );
/**
* Create a submission associated with the XYZ form, upon submitting the form with ID N. I.e. use the N form values to populate
* the XYZ form entries.
*
* @hook gform_after_submission_x
*/
function wpdoin_after_submission_add_n_form_submission( $entry, $form ) {
@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 / gra2.js
Last active September 17, 2024 10:56
Gra 2 JS
document.addEventListener("DOMContentLoaded", function () {
const player = document.getElementById("bunny");
const container = document.getElementById("container");
const scoreWrap = document.getElementById("score");
const impactSound = document.getElementById('impact');
const impactSoundBunny = document.getElementById('impact-bunny');
const musicSound = document.getElementById('music');
const musicBtn = document.getElementById('music-btn');
@gicolek
gicolek / gra2.php
Last active September 17, 2024 10:56
Plugins Code
<?php
/*
Plugin Name: Bunny vs Ghosts
Plugin URI: https://wp-doin.com/a-simple-platform-game-concept-made-with-ai
Description: A simply plugin to be installed on a WordPress website, which when embeded prints a simple side scroller game.
Version: 1.0.0
Author: Rafał Gicgier + ChatGPT
Author URI: https://wp-doin.com/
Text Domain: wp-doin
Domain Path: /lang
@gicolek
gicolek / contact_form_7_updates.css
Last active August 26, 2024 12:50
Contact Form 7 updated CSS
.wpcf7-form label {
width: 100%;
display: flex;
padding: 10px 0;
flex-direction: column;
}
.wpcf7-form-control {
padding: 10px !important;
border-radius: 10px;
@gicolek
gicolek / contact_form_7_layout.html
Last active August 26, 2024 12:47
Contact Form 7 layout
<div class="c-custom-contact-form-7">
<div class="c-custom-contact-form-7__overlay">
✉️ <a href="mailto:contact@wp-doin.com">contact@wp-doin.com</a>
</div>
<h2> Contact Us </h2>
<div class="c-grid">
<label> Your name
[text* your-name] </label>
<label> Your email