Most information you need to collect from a customer relates specifically to the product that they are purchasing. In that case it's probably much better to include this data into its description using the standard product options. See the help files on adding items to the cart using an HTML form for details of that.

However there are occasions when you need to collect more information about the customer than is allowed with the standard invoice and shipping fields. In that case you can use a message field.

There are two distinct ways of using the optional message field and you have to decide which is best for you and your particular circumstance. You should not use both methods at the same time as the information is stored in the same field and it will end up looking like nonsense!


Method 1 - Optional text box in the cart

This is very simple to setup. In Admin enter a short description about the information you are trying to collect and a text box will appear in the cart. For example, you might say "If you have a special request enter it below". This is what will appear in the cart:


If you have a special request enter it below

Method 2 - Posting messages to the cart from your website

You can include the optional field "message" in any link that adds a product to the cart. This isn't as useful as it sounds as any subsequent post of another message will overwrite the previously stored one! However there are some sites which only have a single product page and a single form for adding all products that are sold.


An alternative is to post directly to a special script which will push a message directly into a customer's cart. The URL of the script is:


http://ww#.aitsafe.com/cf/message.cfm


In affect it "primes"the cart with your message or messages and can be used to collect any information you like. A very simple form to post a message would be constructed like this:


<form action="http://ww#.aitsafe.com/cf/message.cfm" method=post>
  <input type=hidden name=userid value=1111111>
  <input type=hidden name=return value=www.yoursite.com/page.htm>
  <textarea cols=20 rows=4 name=message></textarea>
</form>

So it includes the standard fields userid and return.


But you aren't limited to posting just a single field. You can add more fields by naming them all message[] (appending opening an closing square brackets). In addition you can also include a title for each individual message using the field message_title. For example:


<form action="http://ww#.aitsafe.com/cf/message.cfm" method=post>
  <input type=hidden name=userid value=1111111>
  <input type=hidden name=return value=www.yoursite.com/page.htm>
  <input type=hidden name=message_title[] value="My first message">
  <textarea cols=20 rows=4 name=message[]></textarea>
  <input type=hidden name=message_title[] value="My second message">
  <textarea cols=20 rows=4 name=message[]></textarea>
</form>

It is assumed that you will have Method 1 turned off in Admin setup. In which case the contents of the message field is automatically formatted and displayed at the top of the page where the customer enters their invoice and shipping details.


And finally, there is no reason why the message fields have to be a text box! They could be any form input type.