New to Kendo UI for jQuery? Start a free 30-day trial

Messages

configuration

Configures text messages displayed in the Form. Use it to customize or localize the Form messages.

messages

Object
<form id="myForm"></form>

<script>
    $("#myForm").kendoForm({
        orientation: "horizontal",
        formData: {
            ID: 1,
            Name: "Ivan"
        },
        items: [{
            field: "Name",
            label: "Name:"
        }],
        messages: {
            submit: "Custom Submit Button Text",
            clear: "Custom Clear Button Text"
        }
    });
</script>

The text message displayed for the Form clear button.

Default: "Clear"

<form id="myForm"></form>

<script>
    $("#myForm").kendoForm({
        orientation: "horizontal",
        formData: {
            ID: 1,
            Name: "Ivan"
        },
        items: [{
            field: "Name",
            label: "Name:"
        }],
        messages: {
            clear: "Custom Clear Button Text"
        }
    });
</script>

The text message displayed next to a field label when the items.label.optional option is set to true.

Default: "(Optional)"

<form id="myForm"></form>

<script>
    $("#myForm").kendoForm({
        orientation: "horizontal",
        formData: {
            ID: 1,
            Name: "Ivan"
        },
        items: [{
            field: "Name",
            label: {
                text: "Name:",
                optional: true
            }
        }],
        messages: {
            optional: "(Optional field)"
        }
    });
</script>

The text message displayed for the SmartPasteButton when smart paste functionality is enabled.

Default: "Smart Paste"

<form id="myForm"></form>

<script>
    $("#myForm").kendoForm({
        formData: {
            firstName: "",
            lastName: ""
        },
        smartPaste: {
            service: {
                url: "https://api.example.com/parse"
            }
        },
        messages: {
            smartPaste: "AI Fill"
        }
    });
</script>

The text message displayed for the Form submit button.

Default: "Submit"

<form id="myForm"></form>

<script>
    $("#myForm").kendoForm({
        orientation: "horizontal",
        formData: {
            ID: 1,
            Name: "Ivan"
        },
        items: [{
            field: "Name",
            label: "Name:"
        }],
        messages: {
            submit: "Custom Submit Button Text"
        }
    });
</script>