I'm using the UI for MVC Core (Core 1.1). I need to allow users to build their own input forms (unlimited number of inputs and forms). I am storing the configuration of the form (e.g. settings for combobox, dateinput, textbox, etc.) in a database. I want to create the necessary mvc wrappers and save them to a file (or db)...i.e. cache the form. That way when the form is requested, I can just load the cached form. Here is an example of what I would store in a file or database.
@(Html.Kendo().NumericTextBox<
decimal
>().Name("currency").Format("c"))
@(Html.Kendo().NumericTextBox<
decimal
>().Name("currency2").Format("c").Value(50))
Is it possible to then load this information from database or file and have it parsed on a page (i.e. generate the kendo controls)?Or do the wrappers have to be added to the page at design time? If possible, how would I load the file?
Or do I need to create the Kendo html elements instead like below? Or is there another option?
<
input
id
=
"currency"
type
=
"number"
/>
<
input
id
=
"currency2"
type
=
"number"
value
=
"50"
/>
<
script
>
$(document).ready(function() {
$("#currency").kendoNumericTextBox({format: "c"});
$("#currency2").kendoNumericTextBox({format: "c"});
});
</
script
>