Have you ever wanted to collect an extra piece of information from your customers? For example, you may want to ask who referred them, or you may offer a choice of special gifts with their purchase. With a bit of HTML, you can easily add custom fields to your Infusionsoft order forms.
Setup the custom field
You’ll need to have a custom contact field. If you aren’t sure how to do this, follow these instructions provided by Infusionsoft. For this example, I named this field Referred by. Once your field is created, click the View the field database names (for the API) link to find the field’s database name. You’ll need this name in a later step.
Add the HTML to your form
You’ll need a snippet of HTML to get the field to show up on your form. In this example, my field’s database name is Referredby. You will want to replace both instances of Referredby with your own field name below.
Copy and paste this snippet into an HTML area of your order form, for example the Product Information section:
Were you referred by someone? <input id="Contact0_Referredby" name="Contact0_Referredby" type="text" /><br><br>
This example is very simplistic. You’ll probably want to style it to match your form’s design.
Test it out
It is always a good idea to test your changes. If you entered the HTML correctly, then your field should show up on your order form.
If you make a test order, then the custom field should get saved to the contact record. If it isn’t, check to make sure you used the correct field database name in the HTML and prefaced it with Contact0_.
Taking it a step further
You could also use a text area, a dropdown list, or radio buttons.
You could also add validation. For example, if you wanted to require the referred by field, you could make the HTML like this:
Were you referred by someone? <input id="Contact0_Referredby" name="Contact0_Referredby" type="text" class="regula-validation" data-constraints="@Required(label="Referred By", groups=[customer])" /><br><br>
By adding the regula-validation class and a data-constraints attribute, Infusionsoft’s own validation Javascript will make sure the field is filled in before allowing the customer to place an order.
I want to add an infusionsoft custom field that is a dropdown list. What would the HTML code be for that?
Thanks!
Hey Kristina, I found this video here that shows you how to add a dropdown list…
https://www.youtube.com/watch?v=p-x4bDuX2ZM
Is there a way to pass in a value for this field? Ideally, we want to be able to have something like “campaign” submitted into the order form (for example, through a GET parameter on a link that pointed to the order form), where the value would be captured in a custom field and passed along with the order.
is there any way to put the new field at the bottom under billing and shipping? Or better yet, I would like to add a PO Number field IN the billing table.
Is there a way to actually validate the “type” of content added.
For instance, when someone enters an email address… can it be validated as a properly formatted email address?
I did add your code with the regula-validation class and a data-constraints attribute with Infusionsoft’s own validation Javascript and it does make sure the field is filled in before allowing the customer to place an order. However, it doesn’t validate the “type” of content that is entered.
I added this to my form (order form) https://wm225.infusionsoft.com/app/orderForms/test but the 2 fields aren’t transferring the data over once the order is submitted. It’s showing blank for those fields in the customer contact.
Any help you can give would be GREATLY appreciated. Thanks a bunch.
If the fields are saving on the contact record, then you probably have the wrong database field name. Double check the database name on your Infusionsoft custom fields page (instructions are in the original post). There typically aren’t any underscores in the database field name.
How about adding a original field like Job Title? What would the tablename of tablename_JobTitle be?
Is Contact0_ required for non-custom fields such as Job Title? If not, what if anything would need to preface the field name?
I’m looking to add the Job Title field to an order form. Would the following be appropriate? Or should “Contact0_” be replaced with something else given this is not a custom field?
name=”Contact0_JobTitle”
I’m wanting to add a hidden field to a web form is that possible?
Love this! Is it possible to do the same thing but for an ORDER field instead of a custom field?