Hi Abu,
I just spent few hours on this and i can't understand where i make wrong …
I have a problem with the feature "readonly-when".
My field is the following:
$col = array();
$col["title"] = "Description"; // caption of column
$col["name"] = "description";
$col["align"] = "center";
$col["editable"] = True;
$col["editrules"] = array("required"=>true, "readonly"=>true, "readonly-when"=>"check_invoice");
$col["show"] = array("list"=>true, "add"=>true, "edit"=>true, "view"=>true);
$cols[] = $col;
The JS function check_invoice:
function check_invoice(formid)
{
invoice_id = jQuery("input[name=invoice_id]:last, select[name=invoice_id]:last",formid).val();
alert(invoice_id);
console.log(formid);
return true;
}
The key of the grid invoice_id.
The alert is alway returning undefined.
I tried to log the formid object but i'm not sure about the what i should have.
Right now i have this:
https://pastebin.com/fEdSvf1V
Can you give any suggestion on where can i search for my problem ?
Thanks
Mofel
Pastebin link code is not displaying correctly.
Please refer code column-access.php line 67 for usage.
You can email me at [email protected]