Prefill element from external system (Beta)
Note: Episerver Forms is supported by MVC-based websites only.
This is a Beta feature, which means that it is still in development.
In Forms.Core, DataElementBlockBase uses Autofill to prefill an element with a value from an external system.
AutofillService finds AutofillProvider based on the MappingTable as input, and gets suggestions from them. For example: formElement = Email, AutofillProvider looks up in the CRM system, selects Email data from the ContactTables and returns a suggestion.
Note: Render <datalist> as suggestions for a visitor that views a form in ViewMode.
An element render in ViewMode can have a pre-selected value that is determined by the following input (by priority):
- Manual input from a user.
When a visitor selects a value, it is retained in the element.
- External system autofill.
If a form is connected to an Marketing Automation (MA) system, the MA system can provide information about the visitor to prefill into the element value as the selected value. The first suggestion is set automatically in the input as a predefined value.
- Predefined value.
An editor sets it in edit view.
- In the Demo project.
DemoSystem acts like both IExternalSystem and IAutofillProvider.