[ZBX-25790] The default status of CInput("checkbox") can't be checked Created: 2024 Dec 24  Updated: 2024 Dec 24  Resolved: 2024 Dec 24

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: snow uyl Assignee: Zabbix Development Team
Resolution: Won't fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot from 2024-12-24 11-40-59.png    

 Description   

Steps to reproduce:
I added the following code to widget.view.php
<?php
$powerLabel = new CLabel("Power On/Off", "powerLabel");
$powerLabel->addStyle("margin-left: 10px;");
$powerLabel->addStyle("margin-right: 3px;");
$powerCheckbox = new CInput("checkbox", "powerCheckbox", "on");
$powerCheckbox->setId("powerCheckbox");
$powerDiv = new CDiv([$powerLabel, $powerCheckbox]);
$widgetView = new CWidgetView($data);
$widgetView->addItem($powerDiv);
$widgetView->show();

Result:
See screenshot...
The default check status of powerCheckbox isn't checked.
Expected:
The default check status of powerCheckbox isn checked.
See attached patch file...



 Comments   
Comment by Alexander Vladishev [ 2024 Dec 24 ]

This issue tracker is for Zabbix software bug reports only.
Please use https://www.zabbix.com/community for community support, https://support.zabbix.com/servicedesk for commercial support or contact [email protected] for commercial support options.
Closing as Commercial support required.

Generated at Sat Aug 02 10:09:51 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.