This topic is locked

Consultation on Checkbox

4/24/2018 4:31:16 PM
PHPRunner General questions
D
Daviant author

Regards
It is possible that when starting a list of products any of the Checkbox by default appear deactivated according to the value of one or more fields?
For example, if you want to print a selection of 5 records, can not you select the lines where the X field is 0, for example?
(Google Translate)

admin 4/25/2018

I don't really understand what kind of checkbox you talking about. Please elaborate or provide a screenshot.

D
Daviant author 4/26/2018


For example, according to the image that the boxes would appear deactivated if for example the column NUMERO was empty ...
By deactivated I mean that the line box could not be clicked ...
(Google Translate)

admin 4/26/2018

I see what you saying. Unfortunately we do not have an API for this task. This still can be done with the help of some manual coding.

lefty 4/27/2018



I see what you saying. Unfortunately we do not have an API for this task. This still can be done with the help of some manual coding.


You can do it in the print selected page . where as the field NUMERO will not show in the print page by checking if a NULL/Empty field exists record exists. Never tried with print page but it should work. In before record processed on print page event try. ( For MYSQL ) only.
[color="#008000"]$strSQLExists = "select * from
[color="#008000"]$rsExists = db_query($strSQLExists);
[color="#008000"]if($data)
[color="#008000"] // if record exists do something
[color="#008000"]return false;
[color="#008000"]else
[color="#008000"]return true;
[color="#008000"]}
This will not keep the box from being checked but it will not show in print page. See Documentation Link

admin 4/27/2018

@John,
the question is not about hiding some rows but about deactivating (make disabled) 'select record' checkbox.

lefty 4/29/2018



@John,
the question is not about hiding some rows but about deactivating (make disabled) 'select record' checkbox.


Thanks Sergey you are right , I thought he wanted to hide rows in print page , and that's why he wanted to disable some based on value. I thought my code would be an easier fix.

Here is a link to something that might help Disable Checkbox. or Disable Checkbox.