void callback_add_field( string $field , mixed $callback )

This callback escapes the default auto field output of the field name at the add form. There are no parameters to this callback. You must return to the callback function a string.


function example_callback_add_field(){
    $crud = new grocery_CRUD();
    $crud->callback_add_field('phone', function () {
        return '+30 <input type="text" maxlength="50" value="" name="phone">';
    $crud->callback_add_field('state',function () {
        return '<input type="text" maxlength="50" value="" name="state"> ( for U.S. only )';
    $output = $crud->render();
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