Crud: Fake field not loading when stored in a field not called extras

Created on 29 Apr 2017  路  1Comment  路  Source: Laravel-Backpack/CRUD

Fake fields are saving ok in database, but if the field is called anything other than "extras", the info is not loaded when showing the form. This is the code that is not working ok:

$this->crud->addFields([
    [
        'name'  => 'name',
        'label' => 'Name',
    ],
    [
        'name'      => 'validation',
        'label'     => 'Validation rules',
        'type'      => 'radio',
        'options'   => [ 
                            '4_digits' => '4 digits',
                            'cif' => 'CIF',
                            'email' => 'Email',
                            'date' => 'Date'
                        ],
        'fake'      => true,
        'store_in'  => 'extra'
    ],
    [
        'name'      => 'limit',
        'label'     => 'Character limit',
        'fake'      => true,
        'store_in'  => 'extra'
    ]
]);

Most helpful comment

Add the second fake field here:

protected $fakeColumns = ['extras','second_field'];

>All comments

Add the second fake field here:

protected $fakeColumns = ['extras','second_field'];
Was this page helpful?
0 / 5 - 0 ratings

Related issues

deepaksp picture deepaksp  路  3Comments

sokvebolkol picture sokvebolkol  路  3Comments

abewartech picture abewartech  路  3Comments

genesiscz picture genesiscz  路  3Comments

gotrecillo picture gotrecillo  路  3Comments