This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The following section is an add-on to this tutorial - https://tri.be/gravity-forms-events-calendar-submissions/ | |
//Shout to CreativeSlice.com for their initial work | |
/* Before Starting: | |
- Make sure you have these three plugins installed | |
- Gravity Forms | |
- The Events Calendar | |
- Gravity Forms + Custom Post Types | |
- Once Gravity Forms is installed, create a form with these fields | |
- Single Line Text (Event Title) | |
- Paragraph Text (Event Description) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Add this to your Genesis Theme Settings Page | |
in the Header and Footer Scripts Section | |
<script type="text/javascript"> //Be sure to add this before and after too */ | |
jQuery(document).ready(function($){ | |
$('a[href$="newtab"]').attr('target','_blank'); | |
}); | |
//</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function replaceSpace($string){ | |
return str_replace(' ','+',$string); | |
} | |
// Table and data variables | |
$baseid = '###'; //Required | |
$apikey = '###'; //Required | |
$tablename = '###'; //Required | |
$view = ''; //Optional | |
$lookupfieldname = ''; //Optional 1a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script> | |
<script src="/airtable.js"></script> // https://github.com/Airtable/airtable.js/blob/master/build/airtable.browser.js | |
<script src="https://cdn.jsdelivr.net/npm/vega@5.19.1"></script> | |
<script src="https://cdn.jsdelivr.net/npm/vega-lite@5.0.0"></script> | |
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6.15.1"></script> | |
<script> | |
// this variable allows you to pull variables from the URL - https://www.learningjquery.com/2012/06/get-url-parameters-using-jquery | |
var getUrlParameter = function getUrlParameter(sParam) { | |
var sPageURL = window.location.search.substring(1), sURLVariables = sPageURL.split('&'), sParameterName, i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="results"></div> | |
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script> | |
<script src="/airtable.js"></script> // https://github.com/Airtable/airtable.js/blob/master/build/airtable.browser.js | |
<script> | |
// this allows you to pull variables from the URL - https://www.learningjquery.com/2012/06/get-url-parameters-using-jquery | |
var getUrlParameter = function getUrlParameter(sParam) { | |
var sPageURL = window.location.search.substring(1), | |
sURLVariables = sPageURL.split('&'), | |
sParameterName, | |
i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($){ | |
var isvisbuild = $('.et-fb-iframe-ancestor').length; | |
if (isvisbuild == 0){ | |
// code to not run | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*-----------------------------------------------------------------------------------*/ | |
/* Putting Locations in Checkboxes */ | |
/* Helpful article - https://www.gravityhelp.com/documentation/article/dynamically-populating-drop-down-fields/ */ | |
/*-----------------------------------------------------------------------------------*/ | |
$location_form_id = 9; | |
add_filter( 'gform_pre_render_'.$location_form_id, 'populate_posts' ); | |
add_filter( 'gform_pre_validation_'.$location_form_id, 'populate_posts' ); | |
add_filter( 'gform_pre_submission_'.$location_form_id, 'populate_posts' ); | |
add_filter( 'gform_pre_submission_filter_'.$location_form_id, 'populate_posts' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*-----------------------------------------------------------------------------------*/ | |
/* Putting Locations in a Dropdown, Radio Button, or Multi-Select */ | |
/* Helpful article - https://www.gravityhelp.com/documentation/article/dynamically-populating-drop-down-fields/ */ | |
/*-----------------------------------------------------------------------------------*/ | |
$location_form_id = 9; | |
add_filter( 'gform_pre_render_'.$location_form_id, 'populate_posts' ); | |
add_filter( 'gform_pre_validation_'.$location_form_id, 'populate_posts' ); | |
add_filter( 'gform_pre_submission_'.$location_form_id, 'populate_posts' ); | |
add_filter( 'gform_pre_submission_filter_'.$location_form_id, 'populate_posts' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Change form ID */ | |
$location_form_id = 9; | |
add_filter( 'gform_pre_render_'.$location_form_id, 'populate_list' ); | |
add_filter( 'gform_pre_validation_'.$location_form_id, 'populate_list' ); | |
add_filter( 'gform_pre_submission_'.$location_form_id, 'populate_list' ); | |
add_filter( 'gform_admin_pre_render_'.$location_form_id, 'populate_list' ); | |
function populate_list( $form ) { |
NewerOlder