readonly

Toggles the readonly state of the widget. When the widget is readonly it doesn't allow user input.

There is a difference between disabled and readonly mode. The value of a disabled widget is not posted as part of a form whereas the value of a readonly widget is posted.

Parameters

readonly Boolean

If set to true, the widget will not allow user input. If set to false, the widget will allow user input.

Example - allow user input

Open In Dojo
<input id="otpinput" />
<script>
    $("#otpinput").kendoOTPInput({
        items: 3
    });

    var otpInput = $("#otpinput").getKendoOTPInput();
    otpInput.readonly(false);
</script>

Example - make the widget readonly

Open In Dojo
<input id="otpinput" />
<script>
    $("#otpinput").kendoOTPInput({
        items: 3
    });

    var otpInput = $("#otpinput").getKendoOTPInput();
    otpInput.readonly(true);
</script>
In this article