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:
invoice_id = jQuery("input[name=invoice_id]:last, select[name=invoice_id]:last",formid).val();
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:
Can you give any suggestion on where can i search for my problem ?
Pastebin link code is not displaying correctly.
Please refer code column-access.php line 67 for usage.
You can email me at [email protected]
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?