service.dataObject|Function

Additional data to send with AI service requests.

Example - Static data

<form id="form">
    <input name="firstName" />
    <button id="smartPasteButton"></button>
</form>

<script>
$("#smartPasteButton").kendoSmartPasteButton({
    service: {
        url: "https://api.example.com/smart-paste",
        data: {
            locale: "en-US",
            context: "customer-form"
        }
    }
});
</script>

Example - Dynamic data

<form id="form">
    <input name="firstName" />
    <button id="smartPasteButton"></button>
</form>

<script>
$("#smartPasteButton").kendoSmartPasteButton({
    service: {
        url: "https://api.example.com/smart-paste",
        data: function() {
            return {
                timestamp: new Date().toISOString(),
                userId: getCurrentUserId()
            };
        }
    }
});
</script>
In this article
service.data
Not finding the help you need?
Contact Support