KoolReport's Forum

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

Input Package #839

Open rodger_kz opened this topic on on Apr 29, 2019 - 1 comments

rodger_kz commented on Apr 29, 2019

I have included the select2 input component in my php file using a widget but I can't make a selection using the mouse I can only use the keyboard enter button , what could be the problem?

rodger_kz commented on Apr 30, 2019

This is my code..

      require_once "koolreport\autoload.php";
    use \koolreport\instant\Widget;
    use  \koolreport\inputs\Select2;
    use \koolreport\KoolReport;
 include 'connect.php';
$result = mysqli_query($conn,"SELECT * FROM add_stock");
$rowz=mysqli_fetch_array($result);

$res = array();
while($line = mysqli_fetch_assoc($result)){
    $something['product_name'] = $line["product_name"];
    $something['product_id'] = $line["product_id"];
    array_push($res,$something);
}
 Widget::create(Select2::class,array(
   "multiple"=>true,
          'name'=>"my_select2",
    "placeholder"=>"Select customer",
 "dataSource"=>$res,
    "dataBind"=>array(
        "text"=>"product_name",
        "value"=>"product_id"
    ),
    "attributes"=>array(
        "class"=>"input",
        "id"=>"input"
    )
    ));

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