In some situations you might want to prefill some fields for the user. This can be achieved by the following method.
Dart
Gleap.preFillForm(
formData: <String, dynamic>{
'description': 'This text will be prefilled.',
'errordescription': 'This text will be prefilled as well.',
'someformidentifier': 'This text will also be prefilled.',
},
);Use the field ID of the attribute assigned to the form question as the key. Open AI agents → Forms, select the form and question, and check Attribute (field ID). You can also find field IDs under Settings → Inbox & tickets → Data attributes.


