Custom fields on order
Since v2.2.1 you can add custom-defined fields to the order form.
Setting up the custom fields
The custom fields can be entered if you login as admin and then go to Site Setting. There go to the "Setup" tab and on the bottom, you will see the "Custom fields" section.
The custom fields are defined using JSON syntax. So make sure you have a valid JSON string.
Here is an example of custom fields. You can use this tool to create the JSON.
In the example above, this will output 5 form fields in the order tab.
Here is an explanation of the different fields use
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 | When ftype is an input you can define input types |
placeholder | Placeholder for input |
value | Predefined value |
data | Used only in ftype=select. List of option for the select |
Translation of the custom fields
You should add translation keys for these custom fields keys inside the translation menu. Add them to the "custom" group as shown on the image.
Last updated