This is a migrated thread and some comments may be shown as answers.

No submit button?

2 Answers 1913 Views
Form
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 3
Iron
Iron
Veteran
David asked on 25 Feb 2021, 06:23 PM

Hello,

I am trying to use the form control as a read only output of my model. How can I set the form to read only and get rid of the submit button?

2 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 25 Feb 2021, 07:54 PM

Hello David,

That sounds like a scenario for something like a PropertyGrid. You should Follow the implementation of such a component here (your Vote is already in).

The Form is explicitly an Edit component, it is designed for taking user input and letting the application use it.

Nevertheless, our next version will use the [Editable] data annotation attribute, so you could mark your model fields with [Editable(false)] so the editors (input) the Form renders will be disabled, but that is still not what the form is for, and might not even be feasible for your model.

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

2
Michael
Top achievements
Rank 1
answered on 08 Mar 2021, 07:05 PM

Add an empty <FormButtons> element to the root for, like so:

 

<TelerikForm>

... Items code ...
 <FormButtons>
        @* Intentionally blank: FormButtons - RenderFragment - allows you to add custom buttons to the Form.
            You can use the FormButtons tag to add a Clear button to the Form. If the FormButtons tag is
            defined there will be no default buttons in the Form. *@
    </FormButtons>
</TelerikForm>

Tags
Form
Asked by
David
Top achievements
Rank 3
Iron
Iron
Veteran
Answers by
Marin Bratanov
Telerik team
Michael
Top achievements
Rank 1
Share this question
or