More Crud Table Formatting Options Format crud table column for date, image, read more, description and conditional logic formatting etc

You can format table column for date, image, html,read more, description and conditional logic formatting and many more other options. date format allows you to pass any standard php date formatting string and table will be formatted according to that. image format makes column value as image tag. long description can be made short with some character limit. conditional logic like if product price is greater than 200 than make that background highlight. Similar way view form formatting can be done. Click here to check example of view form formatting options.

  
                                    $pdocrud = new PDOCrud();
                                    $pdocrud->crudTableCol(array("product_line","product_image","product_name","product_description","product_price"));
                                     // date formatting (pass date format)
                                    $pdocrud->tableColFormatting("added_date", "date",array("format" =>"m-d-Y"));
                                    // convert to any html like url or any html with actual value passed as {col-name}
                                     $pdocrud->tableColFormatting("product_line", "html",array("type" =>"html",
                                        "str"=>"
{col-name}
")); $pdocrud->tableColFormatting("product_name", "html",array("type" =>"html", "str"=>"{col-name}")); //convert to image column $pdocrud->tableColFormatting("product_image", "image"); //convert long column text to small text with read more $pdocrud->tableColFormatting("product_description", "readmore", array("length"=>4,"showreadmore"=>true));//not showing read more //conditional logic for formatting table colums - e.g apply css style for cells with product price>200 $pdocrud->tableDataFormatting("col", "style", array("product_price",">", "55"),array("background:#f00","color:#ff0")); //$pdocrud->tableDataFormatting("row", "style", array("product_price",">", "55"),array("background:#000","color:#ff0")); echo $pdocrud->dbTable("products")->render();

More options for table content formatting


Deprecated: Optional parameter $op declared before required parameter $task is implicitly treated as a required parameter in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 924

Deprecated: Creation of dynamic property PDOCrud::$langData is deprecated in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 2075

Deprecated: Optional parameter $page declared before required parameter $totalrecords is implicitly treated as a required parameter in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrudHelper.php on line 191

Deprecated: Creation of dynamic property PDOModel::$characterSet is deprecated in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOModel.php on line 117

Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOModel.php on line 964

Deprecated: Creation of dynamic property PDOModel::$characterSet is deprecated in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOModel.php on line 117

Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOModel.php on line 964

Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOModel.php on line 964

Deprecated: Creation of dynamic property PDOCrud::$dataHTML is deprecated in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 2139

Deprecated: Creation of dynamic property PDOCrud::$fieldList is deprecated in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 2140

Products

Showing 1 to 5 of 107 entries

# Product line Product image Product name Product description Product price Actions
1
Classic Cars
1952 Alpine Renault 1300

Turn....

read more
50.00
2
Classic Cars
1962 LanciaA Delta 16V

Feat....

read more
103.42
3
Classic Cars
1968 Ford Mustang

Hood....

read more
95.34
4
Classic Cars
2001 Ferrari Enzo

Turn....

read more
95.59
5
Trucks and Buses
1958 Setra Bus

Mode....

read more
77.90
# Product line Product image Product name Product description Product price Actions