Warning: include(../../script/pdocrud.php): Failed to open stream: No such file or directory in /var/sentora/hostdata/digjainwi/public_html/allsanginfodev/demo/pages/field-type.php on line 1

Warning: include(../../script/pdocrud.php): Failed to open stream: No such file or directory in /var/sentora/hostdata/digjainwi/public_html/allsanginfodev/demo/pages/field-type.php on line 1

Warning: include(): Failed opening '../../script/pdocrud.php' for inclusion (include_path='.:/opt/remi/php81/root/usr/share/pear:/opt/remi/php81/root/usr/share/php:/usr/share/pear:/usr/share/php') in /var/sentora/hostdata/digjainwi/public_html/allsanginfodev/demo/pages/field-type.php on line 1
PDOCrud - CRUD application generator for PHP and Mysql, Pgsql and Sqlite database.

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


Fatal error: Uncaught Error: Class "PDOCrud" not found in /var/sentora/hostdata/digjainwi/public_html/allsanginfodev/demo/pages/field-type.php:60 Stack trace: #0 {main} thrown in /var/sentora/hostdata/digjainwi/public_html/allsanginfodev/demo/pages/field-type.php on line 60