[Bug] `repeatable` field loads in footer instead of panel if using the `address_google` field
See original GitHub issueBug report
What I did
Created a CRUD controller with an address_google
field and a repeatable
field, and the repeatable
field showed up in the footer rather than the panel.
What I expected to happen
I expected the repeatable
field to show up in the panel, similar to this
What happened
The repeatable
field ended up in the footer, like this
What I’ve already tried to fix it
I have attempted changing the address_google
field. Changing address_google
to address_algolia
or text
produced the What I expected to happen result
Backpack, Laravel, PHP, DB version
When I run php artisan backpack:version
the output is:
### PHP VERSION:
PHP 7.4.13 (cli) (built: Nov 24 2020 12:43:30) ( NTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.13, Copyright (c), by Zend Technologies
with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans
### LARAVEL VERSION:
v7.30.4@9dd38140dc2924daa1a020a3d7a45f9ceff03df3
### BACKPACK VERSION:
4.1.30@62856b1f01fc3e05c80140fc22f85ea2aac8368c
The Code
<?php
namespace App\Features\Location\Backpack\Screens\Location\Controllers;
use App\Features\Location\Backpack\Screens\Location\Requests\AddressRequest;
use App\Features\Location\Models\Address;
use Backpack\CRUD\app\Http\Controllers\CrudController;
use Backpack\CRUD\app\Library\CrudPanel\CrudPanelFacade as CRUD;
/**
* Class AddressCrudController
* @package App\Http\Controllers\Admin
* @property-read \Backpack\CRUD\app\Library\CrudPanel\CrudPanel $crud
*/
class AddressCrudController extends CrudController
{
use \Backpack\CRUD\app\Http\Controllers\Operations\UpdateOperation;
use \Backpack\CRUD\app\Http\Controllers\Operations\ListOperation;
public function setup()
{
CRUD::setModel(Address::class);
CRUD::setRoute(config('backpack.base.route_prefix') . '/address');
CRUD::setEntityNameStrings('address', 'addresses');
}
protected function setupListOperation()
{
CRUD::setFromDb(); // columns
}
protected function setupCreateOperation($editNames = false)
{
CRUD::setValidation(AddressRequest::class);
$this->crud->addFields(
[
[
'name' => 'street_address',
'label' => 'Street Address',
'type' => 'address_google',
'wrapper' => ['class' => 'form-group col-md-6']
],
]
);
$this->crud->addField([ // repeatable
'name' => 'field_',
'label' => 'Fields',
'type' => 'repeatable',
'fields' => [
[
'name' => 'field1',
'label' => 'Field1',
'type' => 'text',
'wrapper' => ['class' => 'form-group col-md-4']
],
[
'name' => 'field2',
'label' => 'Field2',
'type' => 'text',
'wrapper' => ['class' => 'form-group col-md-4']
],
[
'name' => 'field3',
'label' => 'Field3',
'type' => 'text',
'wrapper' => ['class' => 'form-group col-md-4']
],
[
'name' => 'field4',
'type' => 'checkbox',
'label' => 'Field4',
'wrapper' => ['class' => 'form-group col-md-4']
],
],
// optional
'new_item_label' => 'Add Values', // customize the text of the button
'init_rows' => 1, // number of empty rows to be initialized, by default ,
]);
}
protected function setupUpdateOperation()
{
$this->setupCreateOperation(true);
}
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
BUG-000113497: When running the Spatial Join tool, if two ...
Bug Details:BUG-000113497: When running the Spatial Join tool, ... Status, Non-Reproducible ... Add new fields with field names that are not identical.
Read more >Untitled
Peer review process includes, Pekka piippo oulu, Centroid of a trapezoidal area, Spinal research institute melbourne, Ovechkin 65th goal, D&d druid animal ...
Read more >FileMaker Multiple Page Flow Bug - Claris Community
I am creating a printed report layout for multiple fields of a single record that I need to span two pages when printing/creating...
Read more >sitemap-questions-439.xml - Stack Overflow
... -my-method-with-get-or-load-when-communicating-with-a-web-ser 2011-12-13 ... https://stackoverflow.com/questions/312168/java-private-field-visibility ...
Read more >how to add a map location in html
Mapping is the process of defining how a document, and the fields it contains, ... Follow the steps below to create a custom...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you all so much for your help! I was able to fix the issue by updating.
I just tested with your sample code and it works as expected for me (see the screenshot).
@GarrettU27, could you please check your browser console for any errors and send them here?