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.

Click here to view default field type generated based on the data type of the column

  
                            $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


Deprecated: Optional parameter $op declared before required parameter $task is implicitly treated as a required parameter in /home3/openscri/public_html/masinosinaga/pdo-crud/script/classes/PDOCrud.php on line 983

Deprecated: Creation of dynamic property PDOCrud::$langData is deprecated in /home3/openscri/public_html/masinosinaga/pdo-crud/script/classes/PDOCrud.php on line 2227

Deprecated: Optional parameter $page declared before required parameter $totalrecords is implicitly treated as a required parameter in /home3/openscri/public_html/masinosinaga/pdo-crud/script/classes/PDOCrudHelper.php on line 191

Deprecated: Optional parameter $parameters declared before required parameter $data is implicitly treated as a required parameter in /home3/openscri/public_html/masinosinaga/pdo-crud/script/classes/PDOCrudTableFormat.php on line 122

Deprecated: Creation of dynamic property PDOModel::$characterSet is deprecated in /home3/openscri/public_html/masinosinaga/pdo-crud/script/classes/PDOModel.php on line 119

Deprecated: Creation of dynamic property PDOModel::$characterSet is deprecated in /home3/openscri/public_html/masinosinaga/pdo-crud/script/classes/PDOModel.php on line 119

Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in /home3/openscri/public_html/masinosinaga/pdo-crud/script/classes/PDOModel.php on line 1011

Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in /home3/openscri/public_html/masinosinaga/pdo-crud/script/classes/PDOModel.php on line 1011

Deprecated: Creation of dynamic property PDOCrud::$dataHTML is deprecated in /home3/openscri/public_html/masinosinaga/pdo-crud/script/classes/PDOCrud.php on line 2379

Deprecated: Creation of dynamic property PDOCrud::$fieldList is deprecated in /home3/openscri/public_html/masinosinaga/pdo-crud/script/classes/PDOCrud.php on line 2380