Create your own ecommerce website and start selling successfully with ShopWired today

Create your ecommerce website on ShopWired today.
Start today with 14 days free

Create your own ecommerce website and start selling successfully with ShopWired today

Create your ecommerce website on ShopWired today.
Start today with 14 days free

Adding multiple comments fields at checkout

Theme Customisations - Coding
5th March 2021

Before you proceed:
The following article contains information that requires you to have some prior knowledge about coding in order to correctly implement the proposed change to your theme. If done incorrectly alterations made to your theme’s code can negatively impact your website causing visual and performance issues. Therefore, we strongly recommend that you only undertake this effort if you are completely confident that you know what you’re doing. If you have no coding experience at all, aren’t entirely comfortable following the instructions in this article or if you simply don’t understand the instructions then we recommend you instead contact our partners, Coding Masters, who will complete the work for you for a set fee.


Pro tip!

If you're using Platform Checkout, editing your theme's files to make this customisation will not work. Instead, use the platform checkout customisation settings to create these fields.  


On the checkout form you can add a comments field and ask the client to supply additional information for their order, such as special delivery instructions or a gift message, e.g.

<input type="text" name="comments">

If you need to ask your customers different questions at checkout, you can include multiple comments fields within the checkout form and our system will automatically concatenate all of the entries in each field and attach them to the order as a 'comment' which can then be viewed on the view-order page in the admin system.

To do so, just include multiple instances of the form input shown below.

<input type="text" name="comments[]">

For example

<p>
       <label>Gift wrap message</label>
       <input type="text" name="comments[]">
</p>
<p>
       <label>Any special delivery instructions?</label>
       <input type="text" name="comments[]">
</p>