Dynamic Forms includes a set of react widgets designed to work together to quickly build complex forms for Optimizely Configured Commerce sites operating a Spire front end.
Each form and its containing widgets register themselves into the state during run-time, based on the individual widget configuration values. This allows you to configure two instances of the Dynamic Form Text Field widget on the same form, one knows it is the ‘First Name’ field and the other knows it is the ‘Last Name’ field based on the specific configuration values provided when designing the form.
Dynamic Forms can be configured using the CMS or in code. Basic custom forms can be easily created using the CMS with this integration. Advanced forms can also be created as a widget, allowing more complex interactions between the elements on your form, however this will take development. If you are comfortable writing code- the Dynamic Form widgets contain everything needed to have your form change based on selections made by the user.
Available widgets include:
- Dynamic Form
- Dynamic Form Checkbox
- Dynamic Form Checkbox Group
- Dynamic Form File Upload
- Dynamic Form Integer Field
- Dynamic Form Radio Group
- Dynamic Form Select
- Dynamic Form Text Area
- Dynamic Form Text Field
There is an integrated service layer that manages the widgets value in the Application State as the form is filled out. When submitted, the service layer will perform validation against the Dynamic Form widgets. Errors will be displayed on the form indicating validation failures.
Once successfully submitted, the form values are sent to a back-end service that is responsible for sending the notification, and in more advanced scenarios, post the form values to a custom API endpoint. The default behavior is to send an email to a list of configured recipients with the form contents when the form is submitted.
If you are interested in creating amazing forms that are fully integrated into the Optimizely Configured Commerce platform, you will love Dynamic Forms.