How to add fields to an order form

I need to add fields to fill out the personal information for a second participant on an order form, and was told by tech to come here to ask. Does anyone know how to do this?

Hey Melissa,

We don’t have anything built in to do that inside the order form. You could use some custom code to capture that information. I would recommend getting with a developer partner to build that in. Making sure you have explicit permission to email the second participant is very important when implementing this.

Novak Solutions has some good details you could check to get started.

Let us know if you have any questions Melissa! Thanks for your time.

1 Like

Yeah this is developer territory. It might be best to setup an external page in something like WP and allow the api code to do the work.

one quick thing you could do is capture those details on the next ‘thank you’ page

2 Likes

Is there a way to add fields on an order form in IFS? Is it only through editing the CSS?

We would like to add a field so that people can choose to “bring a friend” for the same price and include the friend’s name and email. Is there a way to do that?

Also, would like it to look like this when the link is first clicked instead of them having to click on the CC option to have the fields pop up. Is there a way to do that?

https://gi956.infusionsoft.app/app/orderForms/Wealthy-Goddess-Live-2018-Coaching-Program-Special

Thank you!

I have a number of White Label clients who we offer a discounted rate for the services they sell and we handle all fulfillment. (Each WL client has their own Infusionsoft account)

I would like to add fields to our order forms so the WL client can include their client’s contact info so we can track sales and subscriptions.

The WL client collects payment from their customer and then we would use our order form to make payment to my company (his sale price less discount)

I’m open to any suggestions to accomplish this.

Thanks in advance,
Stan

You can use FormLift plus FormLift Payments to create orders through a regular web form, that way you can collect the info and charge all at the same time.

Here are two options for adding custom fields to an Infusionsoft Order Form:

https://blog.novaksolutions.com/tips/add-a-custom-field-to-your-infusionsoft-order-forms/ from @Jordan_Novak

https://www.blickdigital.com/add-fields-infusionsoft-order-form/ from @Brett_Farr

3rd option. FormLift Payments

All the resources mentioned here were storing info in the Contact’s custom fields.

For my purpose I wanted to store the UTM parameters of the buyer in the order’s custom fields. This way if the person ordered multiple things over time, the data would stick to each respective order.

It was hard to find the right info, so I am documenting it here (since this topic ranks on google for relevant search terms)

Basically it works the same as the Contact custom fields described elsewhere, but the difference is that instead of the field’s name being Contact0_fieldname it has to be Order0_fieldname.

I am using the script below to make it work:

/**
 *  @author:    Tyler Garns http://www.tylergarns.com/infusionsoft/infusionsoft-lead-source-tracking/)
 *  @modified:  20 Aug 2012
 *  @notes:     Free to use and distribute without altering this comment. Would appreciate a link back :)
 *  
 *  This script is based on tyler garn's leadtrack. But has been customized for our needs.
 *
 */
 

var setISOrderSource = function ( funnel_step_id ) {

    var funnel_step_id = funnel_step_id || false;

    var params = getUtmParameters();
    var param_count = 0;
    if(params.medium) {
        jQuery("#orderForm").append('<input id="Order0_trackingmedium" name="Order0_trackingmedium" type="hidden" value="' + params.medium + '">');
        param_count++;
        console.log('Added tracking parameter: Order0_trackingmedium');
    }
    if(params.source) {
        jQuery("#orderForm").append('<input id="Order0_trackingsource" name="Order0_trackingsource" type="hidden" value="' + params.source + '">');
        param_count++;
        console.log('Added tracking parameter: Order0_trackingsource');
    }
    if(params.campaign) {
        jQuery("#orderForm").append('<input id="Order0_trackingcampaign" name="Order0_trackingcampaign" type="hidden" value="' + params.campaign + '">');
        param_count++;
        console.log('Added tracking parameter: Order0_trackingcampaign');
    }
    if(params.term) {
        jQuery("#orderForm").append('<input id="Order0_trackingterm" name="Order0_trackingterm" type="hidden" value="' + params.term + '">');
        param_count++;
        console.log('Added tracking parameter: Order0_trackingterm');
    }
    if(params.content) {
        jQuery("#orderForm").append('<input id="Order0_trackingcontent" name="Order0_trackingcontent" type="hidden" value="' + params.content + '">');
        param_count++;
        console.log('Added tracking parameter: Order0_trackingcontent');
    }
    if(document.referrer) {
        jQuery("#orderForm").append('<input id="Order0_trackingreferrer" name="Order0_trackingreferrer" type="hidden" value="' + document.referrer + '">');
        param_count++;
        console.log('Added tracking parameter: Order0_trackingreferrer');
    }    
    if(funnel_step_id) {
        jQuery("#orderForm").append('<input id="Order0_trackingfunnelstepid" name="Order0_trackingfunnelstepid" type="hidden" value="' + funnel_step_id + '">');
        param_count++;
        console.log('Added tracking parameter: Order0_trackingfunnelstepid');
    }

    console.log('Added tracking ' + param_count + ' parameters');
};

 
// Breaks cookie into an object of keypair cookie values
function crumbleCookie(c)
{
    var cookie_array = document.cookie.split(';');
    var keyvaluepair = {};
    for (var cookie = 0; cookie < cookie_array.length; cookie++)
    {
        var key = cookie_array[cookie].substring(0, cookie_array[cookie].indexOf('=')).trim();
        var value = cookie_array[cookie].substring(cookie_array[cookie].indexOf('=')+1, cookie_array[cookie].length).trim();
        keyvaluepair[key] = value;
    }
 
    if (c)
        return keyvaluepair[c] ? keyvaluepair[c] : null;
 
    return keyvaluepair;
}

/**
 *  Gets Affiliate Cookie if exist
 */
 
function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    // if cookie exists
    if (offset != -1) { 
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1) end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}
 

/**
 *  For GA cookie explanation, see http://services.google.com/analytics/breeze/en/ga_cookies/index.html.
 *
 *  @return             -   <void>
 *
 *  @pre-condition      -   pageTracker initialised properly
 *  @post-condition     -   provides 'get' methods to access specific values in the Google Analytics cookies
 */
function gaCookies()
{
 
    // Cookie syntax: domain-hash.ftime.?.?.utmcsr=X|utmccn=X|utmcmd=X|utmctr=X
    var utmz = function() {
        var utmz_array, source, medium, name, term, content, gclid;
 
        if (crumbleCookie('__utmz'))
            utmz_array = crumbleCookie('__utmz').split('.');
        else
            return null;
 
        var utms = utmz_array[4].split('|');
        for (var i = 0; i < utms.length; i++) {
            var key = utms[i].substring(0, utms[i].indexOf('='));
            var val = decodeURIComponent(utms[i].substring(utms[i].indexOf('=')+1, utms[i].length));
            val = val.replace(/^\(|\)$/g, '');  // strip () brackets
            switch(key)
            {
                case 'utmcsr':
                    source = val;
                    break;
                case 'utmcmd':
                    medium = val;
                    break;
                case 'utmccn':
                    name = val;
                    break;
                case 'utmctr':
                    term = val;
                    break;
                case 'utmcct':
                    content = val;
                    break;
                case 'utmgclid':
                    gclid = val;
                    break;
            }
        }
				
        return {
            'cookie': utmz_array,
            'source': source,
            'medium': medium,
            'name': name,
            'term': term,
            'content': content,
            'gclid': gclid
        };
    };
 
    // Establish public methods
 
    // utmz cookies
    this.getCampaignSource = function () { return (utmz() && utmz().source) ? utmz().source : null };
    this.getCampaignMedium = function () { return (utmz() && utmz().medium) ? utmz().medium : null };
    this.getCampaignName = function () { return (utmz() && utmz().name) ? utmz().name : null };
    this.getCampaignTerm = function () { return (utmz() && utmz().term) ? utmz().term : null};
    this.getCampaignContent = function () { return (utmz() && utmz().content) ? utmz().content : null };
}



function getParameterByName(name)
{
  name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
  var regexS = "[\\?&]" + name + "=([^&#]*)";
  var regex = new RegExp(regexS);
  var results = regex.exec(window.location.search);
  if(results == null)
    return "";
  else
    return decodeURIComponent(results[1].replace(/\+/g, " "));
}

function getUtmParameters(){
    var gac = new gaCookies(),
        params = {};
    if (getParameterByName("utm_source")) {

            params.source = getParameterByName("utm_source");
            params.medium   = getParameterByName("utm_medium");
            params.term       = ( getParameterByName("utm_term") )    ? getParameterByName("utm_term")     : null;
            params.campaign   = ( getParameterByName("utm_campaign") )? getParameterByName("utm_campaign") : null;
            params.content    = ( getParameterByName("utm_content") ) ? getParameterByName("utm_content")  : null;
    } else if(getParameterByName("utml_source")) {

        params.source = getParameterByName("utml_source");
        params.medium   = getParameterByName("utml_medium");
        params.term       = ( getParameterByName("utml_term") )    ? getParameterByName("utml_term")     : null;
        params.campaign   = ( getParameterByName("utml_campaign") )? getParameterByName("utml_campaign") : null;
        params.content    = ( getParameterByName("utml_content") ) ? getParameterByName("utml_content")  : null;
    } else {

        params.source  = ( gac.getCampaignSource() ) ? gac.getCampaignSource()  : null;
        params.medium    = gac.getCampaignMedium();
        params.term        = ( gac.getCampaignTerm() )   ? gac.getCampaignTerm()    : null;
        params.campaign    = ( gac.getCampaignName() )   ? gac.getCampaignName()    : null;
        params.content     = ( gac.getCampaignContent() )? gac.getCampaignContent() : null;
    }

    if(params.source   == "direct")       params.source   = null;
    if(params.campaign == "direct")       params.campaign = null;
    if(params.term     == "not provided") params.term     = null;

    return params;
}

// Optional parameters:
// use_autodoman: automatically forwards UTM for custom domains (Default: false)
// domain: only forward on links to the same domain (Default: false)
// non_utm: Instead of using utm_ parameters, use utml_, which don't 
//          override the session
function forwardUTM( use_autodomain, domain, non_utm ){

    //make autodomain false by default
    var use_autodomain = use_autodomain || false;
    var domain = domain || false;
    var non_utm = non_utm || false;

	// Prevent changing of code while editing in  Thrive Leads' or CF' editor
    if(getParameterByName("tve") == "true" ||
       document.location.hostname == "app.clickfunnels.com") {

        console.log("Thrive or CF editor active, not forwarding UTM.");				
		return;
	}

    //array with domains, for which the utm parameters should be forwarded automatically. 
    var domains = ["somedomain.com", "someotherdomain.com"];

    // Remove current page's domain from autodomain list to prevent self-forwarding
    if(use_autodomain){
        var ind = domains.indexOf(document.location.hostname);
        if (ind > -1) {
            // Don't add UTM parameters to links on the current page's domain
            domains.splice(ind, 1);
        }
    }
    
    //parameter extraction to a new function and then use it in both getHiddenFields and this new function
    var params = getUtmParameters();

    //check if utm_source, utm_medium and utm_campaign are present, if they are not, do not modify links
    //if they are, remove all previous utm parameters from url and then add all utm parameters present on current page (source, medium, campaign, term adn content)
    if( params.source && params.campaign && params.medium ){
        var links = document.getElementsByTagName('a');
        for(var i in links){
            link = links[i]

            if(  (link.classList && link.classList.contains('forward_utm')) ||
                 (use_autodomain && domains.indexOf(link.hostname) > -1) ||
                 (domain != false && domain == link.hostname) ){
                
                var linkParams = parseSearch(link.search);

                //remove all previous utm and utml parameters from url
                for(var j in linkParams){
                    if(/^utm_/.test(j)){
                        delete linkParams[j];
                    } else if(/^utml_/.test(j)){
                        delete linkParams[j];
                    }
                }

                //add all utm parameters present on current page (source, medium, campaign, term adn content)
                if(non_utm === true) {
                    if(params.source )	linkParams.utml_source = params.source;
                    if(params.medium)	linkParams.utml_medium = params.medium;
                    if(params.campaign)	linkParams.utml_campaign = params.campaign;
                    if(params.content)	linkParams.utml_content = params.content;
                    if(params.term)		linkParams.utml_term = params.term;
                } else {
                    if(params.source )	linkParams.utm_source = params.source;
                    if(params.medium)	linkParams.utm_medium = params.medium;
                    if(params.campaign)	linkParams.utm_campaign = params.campaign;
                    if(params.content)	linkParams.utm_content = params.content;
                    if(params.term)		linkParams.utm_term = params.term;
                }
                //write new search string to a link
                link.search = buildSearch(linkParams);
            }
        }
    }
}

function parseSearch(queryString){
    var params = {};
    
    if(queryString != "" && queryString != undefined) {
	    queryString = queryString.replace(/^\?/,'');
	    queryString = queryString.split('&');
	    for (var i in queryString){
	        var keyVal = queryString[i].split('=');
	        params[keyVal[0]] = (keyVal[1])? keyVal[1] : undefined;
	    }
    }

    return params;
}

function buildSearch(params){
    var string = [];
    for (var i in params){
        string.push((params[i])? i + "=" + params[i] : i) ;
    }
    return "?" + string.join("&");
}
```