KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

How to set default checked value of CheckBoxList #2801

Closed cfsinc opened this topic on on Aug 19, 2022 - 2 comments

cfsinc commented on Aug 19, 2022

I have been searching for a bit and if its was obvious I apologize but the only reference I see to how to set the checkbox checked is this post but it has no answer.

How do I default the checkbox checked instead of unchecked?

https://www.koolreport.com/forum/topics/1349

                                <strong>File Name</strong>
                                <?php
                                CheckBoxList::create(array(
                                    "name"=>"file_name",
                                    "data"=>$g_misc_info->_misc_all_file_groups
                                ));
                                ?>
KoolReport commented on Aug 20, 2022

Hi cfsinc,

You can set directly the value of CheckBoxList in form of array.

"value"=>array("value1","value2")

Let us know if it works.

cfsinc commented on Aug 29, 2022

Yes thank you that worked.

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

Inputs