Coloured blocks in form

Goodmorning to you all!
I am trying to re-write an old .asp project with DHTMLX

Customer, who liked demo of DHTMLX and is keen to buy, insists on having this colour effect on a form.

Is there anyway I can do this? I’ve tried using fieldsets and blocks. I was simply thinking of inserting some coloured divs under the form controls…

Any help would be very much appreciated…

image

Solved it myself:

  1. give the blocks and Id :
    {type: “block”, width: 900, css:“flred”, id:“block1”, …

  2. create classes with colours:

.blockred { background-color:red !important; }
  1. apply class with jquery:
    $("#block1").addClass(“blockred”);
    $("#block2").addClass(“blockblue”);

Seems a bit roundabout? can’t I apply a class in the block definition?

Your solution is valid.
Unforuntaely there is no native way to add the classes to the form elements.

Thank you very much sematik…
Unfortunately I’ve hit a problem: I usually do all my forms with “absolute” positioning because I find that the standard method uses too much space… As you see in the above sample the positioning is very close and would become enormous using conventional dhtmlx placement methods.

Can you give me any help on this? Either by telling me how to position controls absolutely within a block or else modifying the default spacing (borders, etc).?

Thank you v. much!

Here you can find some guides about the form controls positioning:
https://docs.dhtmlx.com/form__positioning.html