Skip to content

Instantly share code, notes, and snippets.

View geekontheroad's full-sized avatar

geekontheroad

View GitHub Profile
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
/* Firefox */
input[type=number] {
-moz-appearance: textfield;
<?php
/**
* This function is for Gravity Forms and can be used to bulk update the source url of all entries of a form
*
* @author Johan d'Hollander
* @link https://geekontheroad.com
**/
function update_form_entries_source_url( $form_id, $source_url ) {
// Get all entries for the given form ID
<?php
/**
* This is a simple snippet to add a reset button to the Gravity Forms and trigger the refresh of the summary
* Meant to be used with the Gravity Forms Live Summary add-on (https://geekontheroad.com/live-summary-for-gravity-forms/)
*
* @author Johan d'Hollander
* @link https://geekontheroad.com
**/
add_filter( 'gform_submit_button_51', 'form_submit_button', 10, 2 );
<?php
/**
* This is an example of how to change the default tax rate of a country
* This snippet is meant for the EU VAT for Gravity forms add-on
*
* @author Johan d'Hollander
* @link https://geekontheroad.com/eu-vat-for-gravity-forms/
**/
add_filter( 'gotreu_standard_vat_rate', 'example_change_vat_rate', 10, 2 );
/**
* This is a JavaScript Snippet for the Gravity Forms Live Summary Pro add-on.
* It allows you to overwrite the dispplayed total in the summary
*
* @param string total_formatted This is the formatted total according to the form currency
* @param string total_not_formatted This is the non formatted total. Use this for any calculations
* @param string formId This is the current form id
* @param string type This is the type of the summary and will either be side or the summary field ID
*
* @return string Return the HTML for the total to display
<?php // dont copy this line
/**
* This snippet is written for the Gravity EU VAT plugin ( https://geekontheroad.com/eu-vat-for-gravity-forms )
* It allows you to apply reverse charge tax for valid tax number of the default country
* This snippet is compatible with GF EU VAT v1.0.8.3 and higher
*
* INSTRUCTIONS:
* Copy/Paste the below code to your functions.php or code snippet plugin
* Complete the configuration part at the bottom of this code
*
<?php // don't copy this first line
/**
* This snippet is written for the Gravity EU VAT plugin ( https://geekontheroad.com/eu-vat-for-gravity-forms )
* It allows you to overwrite the default country information on a form basis. This overwrites the default tax country set in the settings
* This snippet is compatible with GF EU VAT v1.0.8.2 and higher
*
* INSTRUCTIONS:
* Copy/Paste the below code to your functions.php or code snippet plugin
* Complete the configuration part at the bottom of this code
*
<?php // don't copy this
/**
* This is a snippet for the Gravity Live Summary Pro addon (http://geekontheroad.com/live-summary-for-gravity-forms/)
*
* It will modify the columns displayed in the live summary mergetag by modifying the underlying templates
* In this case it will remove the QTY and UNIT columns from the live summary mergetag
*
* By Default this code will apply to all forms but it can be limited by adding form-ids to the allowed_forms array at the top of the function.
*
@geekontheroad
geekontheroad / gravity-view-add-entry-notes-new-row.php
Last active February 7, 2024 03:32
This snippet will add an extra row for each row in the gravity view table. This extra row will have the entry notes in an unordered list.
<?php
add_action('gravityview/template/table/cells/after', function ($context) {
$view = $context->view;
$view_id = $view->ID;
if ($view_id !== 140) {
return;
}
<?php
/**
* Snippet For Gravity Perks Google Sheets
*
* Description: Create a daily spreadsheet for your feed. The spreadsheet will be created after the first entry of that day.
*
* Instructions: Copy this code to your functions.php and enter your form id and feed ids at the bottom in the configuration section
*
* @author Johan d'Hollander
* @link https://geekontheroad.com