Code to pass promo code on Infusionsoft Order Form

 <script>jQuery(document).ready(function() {

function getUrlVar(key){

var result = new RegExp(key + "=([^&]*)", "i").exec(window.location.search);

if (result != null) {

if (result[1].substring(0,1) != "+") {

result[1] = result[1].replace(/\+/g," ");

} else {

result[1] = "+" + result[1].substring(1).replace(/\+/g," ");

}

}

return result && result[1] || "";

}

jQuery('#promoCode').val(decodeURIComponent(getUrlVar('promoCode')));

jQuery('a.codeButton')[0].click();

});

</script>

To send the link with the pre-filled promo code, add query string  ?promocode=PromoCode  to the end of the order form URL

*Update green highlighted sections with the actual promo code.