Hello Group,
We are prototyping our use cases of generating dynamic forms for end-users using jsonforms package with React and its really useful and allowing us to checkoff lot of our checkmark for use cases.
However, we need some expert opinion on how we can use jsonforms to generate dynamic forms which allows user to design the form that they need as per following use case.
Use Case: We are trying to generate form which allows user to pick various topics from predefined categories so they can generate their version of forms. Categories which we have is Personal Profiles, Hobbies, Interest and Tell Us About Yourself.
Personal Profiles have fields for First Name, Last Name, Email, Phone Number and DoB. (Where FN and LN are mandatory).
Hobbies: We have various subcategories: Books, Movies and Sports (each subcategory have 5 or more multi select options).
Interest: Allow end user to create customized Questions which could be Yes or No (Boolean) or one line answers.
Tell Us About Yourself: This is multiline text control where we want to use Text Formatter (like Draft.js)
We are able to achieve using Jsonforms to do profile and hobby categories with predefined forms as follow:
Person Profile detail is using String, birthdate, and other controls to build this category.
For Hobbies section we are using various control such as Radio button and array element and Enum to select the categories which are layout with group.
So far so good since it allows us to statically define all categories.
Now we need some guidance on how we can achieve following:
- Interest section where user can define multiple questions for end user to fill in. However each question will have option to either have boolean choice or short answer. I know we can define array of control but I need help on how to define control of different type.
- For Text Control we are going to define custom control so it can allow text formatting. Something like Draft.js
- Our form is currently static type, but now we want user to create dynamic form in any order which means that user can add any category as they linke and they can rearrange them in any order. Once again we don’t know how we can achieve such a requirement with current control
- Example: We want to have add button which predefine selection of adding Profile, Intrest, Hobby and More about you.
- Is there any control which allows multiselect options?
Please let us know how we can achieve above use case with current control and any guidance on how to create custom control to achieve these use cases.
Once again Thank you for your consideration and look forward to hear your suggestion.
Thank You.