In case you've missed it, you are looking at an older version of the website. Checkout our latest version, we promise you will love it 😍

display_as

void display_as ( $field_name , $display_as )
Quick Description: Changes the displaying label of the field

Changes the displaying label of the field. The label will change the field label and the column label. You can add any utf8 character you like. For example you can translate all the fields to your language

Example:

function full_example()
{
    $crud = new grocery_CRUD();
 
    $crud->set_table('customers')
        ->set_subject('Customer')
        ->columns('customerName','contactLastName','phone','city','country','creditLimit');
 
    $crud->display_as('customerName','Name')->display_as('contactLastName','Last Name');
 
    $crud->fields('customerName','contactLastName','phone','city','country','creditLimit');
    $crud->required_fields('customerName','contactLastName');
 
    $output = $crud->render();
 
    $this->_example_output($output);
}
Note: The below example is an iframe so it might appeared with a scroll bar. If you like you can view the example on a new tab