Skip to content

Instantly share code, notes, and snippets.

@ksnider
ksnider / geoip-APIGuys.js
Created January 8, 2015 15:56
Gets GeoIP information, when available, and writes to designated fields
<script src="//theapiguys.com/scripts/geoip/location.php"></script>
<script type="text/javascript">
$ = jQuery;
$(document).ready(function () {
//Hides these form fields
jQuery('#inf_field_City').parent().parent().hide();
jQuery('#inf_field_State').parent().parent().hide();
jQuery('#inf_field_Country').parent().parent().hide();
jQuery('#inf_custom_TimeZone').parent().parent().hide();
jQuery('#inf_custom_IPAddress').parent().parent().hide();
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css" />
<script src="//code.jquery.com/jquery-1.10.2.js">
</script>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js">
</script>
<script type="text/javascript">
$ = jQuery;
$(document).ready(function() {
var dateFields = [
'inf_custom_LastViewDate',
@ksnider
ksnider / datepicker.js
Last active August 29, 2015 14:13
This script will allow you to pop up a calendar on a date field in an Infusionsoft web form for easy entry of dates
/*
Instructions: This script will allow you to pop up a calendar on a date field for easy entry of dates. It needs to be
modified in order to work. In the code below, replace the REPLACE WITH INFUSIONSOFT FIELD NAME with a # and the ID
of the field(s) you want to add the date picker for. Make sure you leave the single quotes in place.
Common date field names:
Birthday - #inf_field_Birthday
Anniversary - #inf_field_Anniversary
Custom date fields will be in the format of: inf_custom_CustomFieldName (instead of CustomFieldName it is the name of
the field in the database)
@ksnider
ksnider / track-email.php
Created September 7, 2014 10:38
Code for tracking opens in an Infusionsoft emial
<?php
//Configure connection to Infusionsoft API
require("isdk.php");
$app = new iSDK();
$app->cfgCon("connectionName"); // Change to your connection name
// Action to perform on open
$contactId = $_REQUEST['contactId'];
$groupId = 1183; // This is a tag I am applying. Your ID will be different
@ksnider
ksnider / test.html
Last active August 29, 2015 14:01
Wordpress Embed Test
<p>This is a demo for <strong>[[urlparam param="first" /] [urlparam param="last" /][ ([[urlparam param="email" /]])</strong> o
f Cleancorp's automated contract process.</p>
<?php
echo "Hello World! <br/>";
// Connect to Infusionsoft
require_once("isdk.php");
$app = new iSDK;
if ($app->cfgCon("connectionName")) {
<?php
/*
++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++
++ ++
++ Get GF data from query ++
++ string and write it to IS ++
++ ++
++++++++++++++++++++++++++++++++++
<?php
// Form -> https://dfy90994.infusionsoft.com/app/form/rediect-demo1
/* Result -> http://api-demo.com/scripts/redirect1.php?contactId=139&inf_contact_key=9b4162c036ec99f219b6a58e65631ff0463e882af0cdd7a482120a96f57c7544&inf_field_FirstName=Demome&inf_field_Email=demome%40kimsnider.com&inf-h3l6I1Ke8aJBAi2k=&inf_option_OrderType=389 (389 = subscription) (391=one time) */
// thank-you - > api-demo.com/scripts/redirect1.php
$type= $_GET['inf_option_OrderType'];
<?php
/*
++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++
++ ++
++ Get GF data from query ++
++ string and write it to IS ++
++ ++
++++++++++++++++++++++++++++++++++
<?php
/*
* Sample project:
* I need all new contacts entered into IS--whether by web form, order form, manual or
* import to have their email * address set as their username, too.
* I'd like to set that action as an action set that so that i can run it under
* all ACTIONS and also give it to the admins to perform on imports.