I had to hide several of the buttons on the condition. Here is the solution.
On the form there is a div, created in "core"-"div". The attributes specified in the text: id="div_butt_save".
In this div there are buttons: "Save", "Save and close"...
And this code:
/*Stuff -> Script (JS)*/
...onclick:
function fun1() {
a=document.getElementById("select_firms").value; /*core 42 - handmade "!select" with multiple "if...", dont work save to database. */
document.getElementById("firms").value = a; /*For this reason, the value is passed to a standard "firms" (simple select) */
if (a=="") { /*if the user does not check the value, this code will rip the user's eyes...*/
document.getElementById("div_butt_save").style.visibility='hidden';
} else {
document.getElementById("div_butt_save").style.visibility='visible';
}
};
Sorry for mistakes, I'm not a robot, I learn.
Thanks!