Adding custom fields
Learn how to add custom fields to a low-code checkout
Last updated
Learn how to add custom fields to a low-code checkout
Last updated
If you’d like to collect additional customer information during a , you can add custom fields to the experience.
Digital River adds what these fields contain to the so that you can use it in downstream processes.
On , you can configure a maximum of two custom fields, each of which can accept a number, text (i.e., string), or a set of pre-defined drop-down options.
For each field, you need to:
Indicate whether it’s required or optional.
Define a unique key and make sure it contains no whitespaces.
Define a label that will be displayed to customers in the experience.
If you’re using the drop-down field, you must enumerate acceptable values and provide a display label for each.
Physical products in items[]
Digital only products in items[]
If you mark a field as required and customers don't provide a value, they are prompted for input.
Number-only fields provide help text if customers enter a non-digit character.
Number and text fields accept values with a maximum length of 500 characters.
If your application is set up correctly, this should block customers from proceeding to the checkout's next stage.
You can access this data by:
Once you have this metadata
, you can use it to populate email notifications, fulfill an order’s goods, or perform other operations of your choice.
If you mark it as required, then express checkout is disabled in .
Depending on whether you add to the Digital River renders your custom fields in the shipping or billing information forms.
Labels aren't translated into the of the , but instead default to English.
The function, which submits the data collected by the in an update request, returns false
if the user (1) fails to enter a value in a custom field that you marked as required or (2) enters a value that exceeds 500 characters in a custom number or text field.
For details, refer to .
You might want to disable the , if you , When users click a button in this component, they are redirected to a payment provider. However, the form in the provider's interface lacks a field to collect your custom data, so it won't get added to the .
After customers successfully submit the form, Digital River adds the key and value of each field they completed to the metadata
.
to listen for certain of , such as , , , order.fulfilled
, and .
Assigning a callback to in and then implementing a handler.
Assigning a callback to in the and then implementing a handler.
Making a call to .