Checkbox readonly conditional

QuestionsCheckbox readonly conditional
Gustavo asked 8 years ago

Hi! Im trying to use "readonly-when" on a checkbox field but cant make it works.
Im using column access example like this:

$col = array();
$col["title"] = "Metodos";
$col["name"] = "firma_metodos";
$col["width"] = "10";
$col["edittype"] = "checkbox";
$col["formatter"] = "checkbox";
$col["editable"] = true; // this column is editable
$col["editoptions"] = array("value"=>"1:0");
$col["editrules"] = array("readonly"=>true, "readonly-when"=>array("==","1"));
$cols[] = $col;

What am I doing wrong?

Thanks!!

3 Answers
Abu Ghufran answered 8 years ago

This is currently not supported in your version.
I'll be emailing you updated build with working demo.

Usage:
$col["editrules"] = array("readonly"=>true, "readonly-when"=>"checked"); // or unchecked

selectcas.biz answered 8 years ago

Abu, I have received your mail and replaced the lib.
When I tried with "checked" nothing happends, with "unchecked" the checkbox its readonly in anycase.
There is something else to configure?

Abu Ghufran answered 8 years ago

Did you check the example-all.php if it is working as expected?
I've changed the "closed" field as checkbox readonly when checked.

Your Answer

3 + 19 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?