Field type settings Change type of fields in PDOCrud

By deafult, PDOCrud generates the field type based on the data type of the column and name of column in the database table. You can also change the type of field as required using the fieldTypes function.

                            $pdocrud = new PDOCrud();
                            $pdocrud->fieldTypes("about_yourself", "textarea");//change about_yourself 'textarea' to input type text
                            $pdocrud->fieldTypes("educational_status", "textarea"); // change educational_status 'input text' to textarea
                            $pdocrud->fieldTypes("gender", "radio");//change gender to radio button
                            $pdocrud->fieldDataBinding("gender", array("male","female"), "", "","array");//add data for radio button
                            $pdocrud->fieldTypes("hobbies", "checkbox");//change hobbies to checkbox button
                            $pdocrud->fieldDataBinding("hobbies", array("Dance","Art","Games"), "", "","array");//add data for checkbox button
                            $pdocrud->fieldTypes("state", "select");//change state to select dropdown
                            $pdocrud->fieldDataBinding("state", array("Andhra Pradesh","Bihar","Patna","Gujarat","Madhya Pradesh"), "", "","array");//add data using array in select dropdown
                            $pdocrud->fieldTypes("country", "multiselect");//change country to multiselect dropdown
                            $pdocrud->fieldDataBinding("country", array("India","Brazil","UK","Pakistan"), "", "","array");//add data using array in multiselect
                            echo $pdocrud->dbTable("users")->render("insertform");

Change field type using PDOCrud