I have a problem with loading javascript. I have hidden fields with the key function in "Client Side Events". When I load the page (add) the field is set to the correct value "1" the field and set as "Select". When I use the mobile version, even if the field is set to "1" all fields remain visible. To resolve I have to "reselect" the field manually. It seems that when the "add" page is loaded only in the mobile version the javascript code is not executed. Using the field with the default value of "1" I also tried to use "Page_Render ()" to set the default value, but from the mobile version the problem remains.
(movimenti_add.php)
// Page Render event
function Page_Render() {
//echo "Page Render";
$this->idCausaleMov->CurrentValue = '1';
}
// Load default values
protected function loadDefaultValues() {
$this->idCausaleMov->CurrentValue = 1;
...
(uservevt15.js)
// Table 'movimenti' Field 'idCausaleMov'
$('[data-table=movimenti][data-field=x_idCausaleMov]').on(
{ // keys = event types, values = handler functions
//"click": function(e)
"change": function(e) {
// Your code
console.log("idCas:"+this.value);
if (this.value == "0" this.value == "" this.value === "{value}" this.value == "1" this.value == "2") { // buying or cancel
$(this).fields("field1").visible(false);
$(this).fields("field2").visible(false);
$(this).fields("field3").visible(false);
..