Tuesday’s Tip: Remove unwanted fields from your Infusionsoft shopping cart or order form

UPDATE 7/1/2014: Updated the code to remove company and address line 2 from the shipping side as well as the billing side.

If the company name or second address line aren’t relevant for your business, you can easily hide these fields with a small snippet of JavaScript. Simply add this code to the Customer Header field for your shopping cart or order form:

<script type="text/javascript">
// <![CDATA[
jQuery(function(){
    jQuery('#company').parent().parent().hide();
    jQuery('#addressLine2').parent().parent().hide();
    jQuery('#shipCompany').parent().parent().hide();
    jQuery('#shipAddressLine2').parent().parent().hide();
});
// ]]>
</script>

The fields will still exist on your checkout page but will be invisible to your customers, so make sure the company field isn’t marked as being required or they won’t be able to checkout!

16 Comments

  1. How do you remove it if it IS a required field?

    Reply
    • It is is a required field, then you have to provide a value to get past Infusionsoft’s validation. You could set a default value using jQuery and then hide the field. To set a value you’d do something like this:
      jQuery('#company').val('Not required');
      The company name would then be set to “Not required”.

      Reply
      • Hi Jacob! InfusionSoft sent me to this blog post because I am trying to make the phone number not required. However, when I put this code into the Custom Header of my shopping cart (and tried to remove the Company option), it didn’t do anything. And then I tried to change the value to “phonenumber,” but it still didn’t do anything. I don’t know much about coding, but if you have any other suggestions, I would so appreciate it. Thanks!

      • Sorry, this code won’t work for you. This code only works at hiding fields that aren’t marked as required.

  2. This code removes it from the Billing information but not the Shipping. How would you remove it from the shipping side as well? Thanks.

    Reply
    • I’ve updated the code to remove the fields from both billing and shipping.

      Reply
  3. Any way to add a custom field to the Billing Information?

    Reply
    • Hmm not sure. I’ll look into this for a future tip.

      Reply
  4. Is there any way to remove the ‘Shipping Option’ from an order form even if you still want to provide the Shipping Information fields? IE – product being sold wants to collect shipping information BUT shipping cost is already included in price of product so there is no need to still have the ‘Shipping Option’ radio button and confuses customers….

    Reply
  5. Hi and thanks for all this help. Is there a way to remove the cc field on a single order form? Some of our events are free and there is no need to collect cc info.

    Reply
  6. Hi Jacob, I believe Infusionsoft may have changed their order form templates? I tried your code today and didn’t have any success. Do you know if it still works?

    Reply
    • Worked for me on an order form created today. Thanks for the help Jacob 🙂

      Reply
  7. The code removes the fields for me but I am wondering if there is a way to keep them there but make it so there not mandatory? Thanks

    Reply
  8. I would also like to know if it is possible to leave the field there but make it so it is not mandatory ? Many thanks in advance.

    Reply

Leave a Reply to Kristina Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.