πŸ“Custom Fields on Order

Starting from version 2.2.1, you have the ability to incorporate custom-defined fields into the order form.

Setting up the Custom Fields

To configure custom fields, log in as an admin and navigate to the Site Settings section. Then, proceed to the Setup tab and scroll to the bottom where you'll find the Custom Fields section.

Custom fields are defined using JSON syntax, so ensure your input adheres to valid JSON format.

Below is an example of custom fields. You can utilize a JSON creation tool to generate the necessary JSON structure.

[{
        "title": "Customer phone numner",
        "key": "customer_phone_number",
        "ftype": "input",
        "type": "phone",
        "placeholder": "Enter your phone"
    },
    {
        "title": "Customer email",
        "key": "customer_email",
        "ftype": "input",
        "type": "email",
        "value": "predefined@email.com"
    },
    {
        "title": "Country",
        "key": "customer_country",
        "ftype": "select",
        "data": {
            "ph": "Philippines",
            "usa": "United States of America"
        }
    },
    {
        "title": "is this a gift",
        "key": "send_as_gift",
        "ftype": "bool",
        "value": true
    },
    {
        "title": "Custom note",
        "key": "custom_note",
        "ftype": "textarea"
    }
]

In the example provided, this configuration will result in the display of five additional form fields within the order tab.

Here's an overview of the purpose of each field:

Field key

Description

title*

Title - label on the fields

key*

The unique identifier - use lowercase no space and no special characters

ftype

input, select, bool, textarea

type

placeholder

Placeholder for input

value

Predefined value

data

Used only in ftype=select. List of option for the select

Custom Fields Translation

You should add translation keys for these custom field keys within the translation menu. Add them to the "custom" group, as demonstrated in the image.

Last updated