Code for Adding Infusionsoft Text Fields to Infusionsoft Order Forms

<script type="text/javascript">

jQuery(document).ready(function(){

    jQuery("#PAYMENT_SELECTION").before(

        '<div id="Additional Info">' +

        '<table class="paymentMethodTable" style="width:100%;margin:10px 0 0 0">' +

        '<tr>' +

        '<th class="leftAlign">Additional Information</th>' +

        '</tr>' +

        '<tr class="cellLow">' +

        '<td>' +

        '<input name="Contact0_InfusionsoftName" placeholder="Your Custom Field Label" type="text" name="Contact0_InfusionsoftName">' +

        '</td>' +

        '</tr>' +

        '</table>' +

        '</div>'

    );

        jQuery("a.continueButton:first").click(function(event){

        var original = jQuery(this).attr('href').replace(/javascript:/g, '');

        event.preventDefault();

          if(jQuery("input[name=Contact0_InfusionsoftName]").val().replace(/ /g,'') == ""){

                                alert("Please fill out all fields in the additional information section.");

                                jQuery("input[name=Contact0_InfusionsoftName]").focus();

                                return false;

                                

                        } else {

                                eval(original);

                return true;

            }

        });

});

</script>