PDOCrud Add conditional logic to show/hide fields

Conditional logic to show/hide some fields based on the value of field. Please note that this will work with the main table fields only. You can define for which value show some other fields or hide some other fields.

  
                            $pdocrud = new PDOCrud();
                            $pdocrud->fieldTypes("City", "select");//change state to select dropdown
                            $pdocrud->fieldDataBinding("City", array("Newyork"=>"Newyork","London"=>"London","Delhi"=>"Delhi","Other"=>"Other"), "", "","array");//add data using array in select dropdown
                            //when city is other then hide state and zip code else show
                            $pdocrud->fieldConditionalLogic("city", "Other", "=", "State", "hide");
                            $pdocrud->fieldConditionalLogic("city", "Other", "=", "Zip", "hide");
                            $pdocrud->fieldConditionalLogic("city", "Other", "!=", "State", "show");
                            $pdocrud->fieldConditionalLogic("city", "Other", "!=", "Zip", "show");
                            echo $pdocrud->dbTable("employee")->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

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