ArtiGrid
v1.6

Classes and Field Attributes

With fieldCss and fieldAttr, you can customize the fields in your form:

fieldCss

fieldCss($field, $classes) → assigns CSS classes to a specific field.

Example:

$grid->fieldCss("customerNumber", ["demo"]);

This adds the demo class to the customerNumber input.

fieldAttr

fieldAttr($field, $attributes) → assigns custom HTML attributes.

Example:

$grid->fieldAttr("customerNumber", ["placeholder" => "*****"]);

Esto añade un placeholder="*****" al input customerNumber.


<?php
    $grid = new ArtiGrid();
    $grid->table('payments')
        ->fieldCss("customerNumber", ["demo"])
        ->fieldAttr("customerNumber", ["placeholder" => "*****"]);
    echo $grid->render();
?>
paymentId customerNumber checkNumber paymentDate amount Actions