Well I think I will release this as it is now, I have already spend too much time on that damned checkbox !
With the latest version that is now in my github repo the checkbox seems to be working in all themes and browsers that I have tried.
The problem is that it is not showing at the right place so it "push" the fields below
Display with the box checked:
and if you uncheck the box:
I have tried multiple variations without any succes
Most probably my error is in the place where I am inserting the checkbox
var n = document.getElementById('id_correctness_' +i);
loc = n.parentNode
while(!loc.classList.contains("fitem")) {
loc = loc.parentNode;
}
var showid = 'id_correctness_' + i + '_show';
var b = document.getElementById(showid);
if (b == null) {
var tmp = document.createElement('div');
tmp.id = showid;
tmp.classList.add('formulas_correctness_show');
b = loc.insertBefore(tmp, loc.firstChild);
}
or in the CSS that I just created for it
/* Styles for the editing form. */
body#page-question-type-formulas .formulas_correctness_show {
display: inline;
width: 15px;
}
But you can see that I have improved the display of the selects and text field so that they match the other elements of the form
If somebody has some knowledge of HTML and CSS and can give me a clue about the place in the DOM or the CSS styles that I should use, don't hesitate you don't need any javascript or php skill to help me if you can inspect the page elements in the console and tell me what I am doing wrong no problem for me to modify the script accordingly.