smartPaste.formFieldsArray
Specifies custom form field configurations for AI processing. If not provided, the SmartPasteButton will automatically detect form fields from the Form's items configuration.
smartPaste.formFields.field String
The name of the form field that corresponds to a form element.
smartPaste.formFields.type String
The expected data type of the form field.
smartPaste.formFields.description String
A description of the form field that helps the AI service understand its purpose.
smartPaste.formFields.allowedValues Array
An array of allowed values that restricts the AI service to only use specific values for this field.
Example - Custom form field configurations with allowedValues
<form id="myForm"></form>
<script>
$("#myForm").kendoForm({
formData: {
firstName: "",
lastName: "",
email: "",
category: ""
},
items: [
{ field: "firstName", label: "First Name" },
{ field: "lastName", label: "Last Name" },
{ field: "email", label: "Email", validation: { required: true } },
{
field: "category",
label: "Category",
editor: "DropDownList",
editorOptions: {
dataSource: ["business", "personal", "urgent"]
}
}
],
smartPaste: {
formFields: [
{ field: "firstName", type: "string", description: "Person's first name" },
{ field: "lastName", type: "string", description: "Person's last name" },
{ field: "email", type: "email", description: "Email address" },
{ field: "category", type: "string", description: "Contact category", allowedValues: ["business", "personal", "urgent"] }
],
service: {
url: "https://your-ai-service.com/api/smart-paste",
headers: {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
});
</script>