PDOCrud Set value of a form field

You can set some default value of field in insert form. For example, in your table, you may have field name created by, which you don't want to fill by user (instead this you want this to be logged in user id) but you want to save that value in table.

  
                                 $pdocrud = new PDOCrud();
                                $pdocrud->formFieldValue("customer_id", "1");//set some default value for customer Id 
                                //or you can entirly hide that field also
                                //$pdocrud->fieldHideLable("customer_id");
                                //$pdocrud->fieldDataAttr("customer_id", array("style"=>"display:none"));
                                $pdocrud->fieldDataAttr("customer_id", array("disabled"=>"disabled"));
                                $pdocrud->formFields(array("customer_id","order_amount","order_date","payment_method"));
                                echo $pdocrud->dbTable("ordertable")->render("insertform");
                                

Deprecated: Required parameter $field follows optional parameter $op in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 924

Deprecated: Required parameter $task follows optional parameter $op in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 924

Deprecated: Required parameter $totalrecords follows optional parameter $page in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrudHelper.php on line 191

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 3532

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 3543

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 3588

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4221

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4230

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 3588

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4221

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4230

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 3588

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4221

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4230

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 3588

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4221

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4230