Dynamic form with Template And Model

3 posts, 1 answers
  1. DevHM
    DevHM avatar
    6 posts
    Member since:
    Jul 2017

    Posted 03 Sep Link to this post

    Hello,

    I would like to have the opinion of Kendo experts on the following subject.
    I would like to create a kind of form that would check if certain conditions are met in order to continue an operation. The conditions are defined in a table as a string text (for example, "Filled the registration form", "Paid the registration fee" and so on ...). It's also possible to have several form one after the other in the case where several operations are in progress simultaneously. In addition, there are two Save and Cancel buttons in each form. I made a small sketch in order to picture this (attached file Dynamic Form.png)

     

    My Controller returns a list of objects like this:

    1. Definition Label #1
      • 1st Checking
      • 2nd Checking
      • 3rd Checking
    2. Definition Label #2 (1st checking) ...

    My question would be: There is a Kendo component that could help me achieve this optimally?
    I managed to fill the form etc ... with jQuery, but when I had to realize the code behind for the buttons, I thought there might be a simpler way. Because I need two things mainly:
    When clicking on the Save button, find out the value for each of the checks for each of the forms. And navigating through the DOM to get this info is somewhat tedious ...
    When clicking Cancel, reset the displayed values to those received by the Controller.
    Having already used Keno for Grid / ComboBox, I would like to know if there was anything that could help me in this case. (Kendo Template and a Model for example?)

  2. Answer
    Ianko
    Admin
    Ianko avatar
    1729 posts

    Posted 05 Sep Link to this post

    Hello DevHM,

    Yes, you can use the Kendo MVVM binder to accomplish some of the requirements. But still you will need to implement some code that will accomplish exactly what you need. 

    You can check out this blog post from Falafel, that demonstrates how to build up a dynamic form out of JSON fetched from the server: https://blog.falafel.com/kendo-ui-creating-an-dynamic-input-form-from-an-external-json-viewmodel/

    Regards,
    Ianko
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. DevHM
    DevHM avatar
    6 posts
    Member since:
    Jul 2017

    Posted 1 day and 17 hours ago in reply to Ianko Link to this post

    Thank you Ianko for your answer. I had a look and it helped me. 
Back to Top