fields

void fields( string $var [, string $var [, string $... ]] )
Quick Description: The fields that user will see on add/edit

The fields that user will see on add and edit form

Example:

function full_example()
{
$crud = new grocery_CRUD();
 
$crud->set_table('customers')
->set_subject('Customer')
->columns('customerName','contactLastName','phone','city','country','creditLimit')
->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