Gadget Templates: Form Design
Available from version 3.2.0.
In previous versions, when creating a template gadget, the forms were auto-generated, recovering the parameters of the code itself. This did not allow any type of customization, categorization, or order, and its use was more focused on technical users. Besides, there were few input types for the template gadget.
In this version, the way of creating forms for gadget templates has been redefined and has been decoupled from the code (The previous way will continue to be compatible but will not be recommended due to the limitations described) and its definition can be recovered from the gadget template itself, so that, by using this definition, we will be able to generate forms in other technologies or with other libraries externally. In addition, to avoid this parametry we are overwriting, now all the gadget templates will receive the parameters in the context in json format in vm.tparams.parameters, which will make their use much easier.
Instead of dragging the input types to the text editors, they will now be dragged to the part of the form where the settings for each element will be defined.
In this form, you can order the different inputs, recursively categorize them by sections, or establish series parameter groups in array mode. Besides, elements that did not exist before are directly allowed and autogenerated, such as color-pickers, multiple selectors, checkbox, …
The final form will look like this:
This is integrated both in the generation part for templates and custom gadgets, as well as in the dashboard editors.
With all this improvement, you customize the aspect of any gadget template, so that it can be used as a different type of gadget.
Â