Add form controls programmatically and save data in different lists

Hello,
we are working on a ticket system for the IT Support Department in the bank. We have built on SharePoint a list of Tickets with TicketId, User, Date, Category. For this list I built the basic form in PlumSail Design Forms. At the same time, we have built on SharePoint a list of Categories and a DropDown in the Form that will be linked to this list. So far everything classic :).
Next, we would like that depending on the Category chosen in DropDown, in the Form will appear the dynamic part: nothing, one or more controls in which the user includes mandatory or optional parameters. If there are only a few Categories, this can be solved by adding all the fields / controls for all categories in the Form and displaying only those for the chosen Category. But in the bank we have dozens of Support Categories and hundreds of related parameters and such a Form would be very difficult to manage. Likewise, we find it difficult to have a different Form for each Category - for any modification (which in fact happens very often in the bank) the intervention of the developer will be required.
Thus, we thought of building on SharePoint a simple list of Parameters configuration for Categories and this list to be managed by the Bank Support Team without programming skills. The Category Parameters List will have the following fields: Category (Category List lookup), ParameterName, Required (Yes / No), ControlType (Choice from TextBox, DropDown, PeoplePicker and CheckBox) and SourceType. For SourceType we will have another general DropDownSource list with all the necessary nomenclatures that will have two fields: SourceType and SourceValues.
With these three configuration lists (Categories, CategoriesParametres and DropDownSource) we would programmatically want to appear in the Form at the choice of the Category all the types of controls for this Category, and if among the controls will be DropDown TypeControls in their source to be the values from SourceValues field filtered by the SourceType field for this DropDown.
As for saving data, in addition to the basic Ticket list, we have also built a list of Ticket Details where we will save the following data in text type fields: TicketID, Parameter Name, Parameter Value. For each TicketID there will be so many registrations, how many parameters the user has completed when completing the ticket.
An example of configuration, dynamic Form and data saving see below (HD in the names of the lists is from HelpDesk):

Is it possible to programmatically add form controls and save data to different lists? If so, we would be very grateful for the code. Thank you in advance!

Best Regards,
Alexandru

Hello @Cumatale,

Welcome to Plumsail Community!

There is no way to programmatically add controls to the form out of the box, but probably you could add HTML control to the form and dynamically add controls with JavaScript to it.

And to get values from other lists and create new list items, you can use PnPjs library. Please see a good example in this post:

Also, you might be interested in Populate dropdown with data from the SharePoint list from another site collection article.