KoolReport's Forum

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

Please recommend a control #2437

Open Richb201 opened this topic on on Nov 18, 2021 - 1 comments

Richb201 commented on Nov 18, 2021

I need to be able to enter text, free-form into a bunch of fields arranged like a spreadsheet. Is there any type of control in the Koolreport collection that is workable?

Sebastian Morales commented on Nov 18, 2021

You can combine DataTables/Table with columns' "formatValue" property like this:

$rowIndexColumn1 = 0;
DataTables::create(array(
    ...
    "columns" => array(
        "column_1" => array(
            ...
            "formatValue" => function($value, $row, $colName) use (& $rowIndex) {
                $textinput = "<input type='text' name='textinput_{$colName}_{$rowIndexColumn1}' value='{$value}' />";
                $rowIndexColumn1++;
                return $textinput;
            }
        ),
    )
));

Then put DataTables/Table and a Submit button inside a <form> to submit your text inputs. Rgds,

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

None