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

Update the Form Input Value with the Selected RadioGroup Value

Environment

Product Progress® Kendo UI® Form for jQuery Progress® Kendo UI® RadioGroup for jQuery

Description

How can I update input value in a Kendo UI for jQuery Form with the selected RadioGroup value?

Solution

To achieve the desired scenario, use the select event of the RadioGroup to update the input value.

    <form id="myForm"></form>
    <script>
      $("#myForm").kendoForm({
        formData: {
          ID: 1,
          Name: "John Doe",
          Address: 3
        },
        items: [{
          field: "Name",
          validation: { required: true }
        }, {
          field: "Address",
          editor: "RadioGroup",
          editorOptions: {
            layout: "horizontal",
            items: ["Insert Procedure", "Update Procedure", "Synchronize Procedure"],
            select:function(e){
              document.getElementById("Name").value = e.target.val();
            }
          },
        }],
      });
    </script>

See Also

In this article