Welcome to the community and thanks for the question!
Yes, it’s possible to customize the form, but it has some disadvantages such as not being able to display the form exactly the same in the android app and not using basic HTML might cause issues with error reporting.
When the form you want to design is too complicated for the default or section forms then your last option is to use a custom form. This takes more time, but gives you full flexibility in terms of the design. In DHIS2 there is a built in HTML editor (CK Editor) in the form designer which allows you to either design the form in the GUI or paste in your html directly (using the “source” window in the editor).
Here’s a recent demonstration from another post:
Hope this answers your question @Roel? Thanks!
Thanks for everything.
I tried this code in the console and it works well. but if i do in the editor does not work
Please know that command in the console is only to illustrate the point; however, a developer famaliar with Java Script would need to customize the code based on the dataset form and need.
One reason why the code works in the console and not in the editor is because it needs to be included inside the script tag as well as used through a function. Additionally, it is using a random ‘selector,’ but to be used on a real form, id or class need to be used for proper selection.
You can try with
If you need any clarifications, don’t hesitate to let me know.