Hi Abu,
I’m trying to delete white spaces from the grid input box when the value is submitted.
Does the grid framework offers any way of doing this?
Kind regards and thank you,
Alberto.
2 Answers
You can try following code, replace $grid with the variable of your grid object.
$e["on_insert"] = array("trim_data", null, true); $e["on_update"] = array("trim_data", null, true); $grid->set_events($e); function trim_data($data) { foreach($data["params"] as $k=>$v) { $data["params"][$k] = trim($v); } }
Your Answer