Dropzone field inside a repeatable field its not working ! #944
Replies: 2 comments 6 replies
-
Hey @JawaharAdol I tested it under repeatable, and it's working for me: CRUD::field('gallery')->type('repeatable')->subfields([
[
'name' => 'dropzone',
'type' => 'dropzone',
'withFiles' => true,
'wrapper' => [
'class' => 'form-group form-control col-md-7 col-xs-12',
],
],
]);
I doubt, you are not importing: +use Backpack\Pro\Http\Controllers\Operations\DropzoneOperation;
class UploaderCrudController extends CrudController
{
use \Backpack\CRUD\app\Http\Controllers\Operations\ListOperation;
use \Backpack\CRUD\app\Http\Controllers\Operations\CreateOperation;
use \Backpack\CRUD\app\Http\Controllers\Operations\UpdateOperation;
use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation;
+ use DropzoneOperation; Also, check if it is related to validations? |
Beta Was this translation helpful? Give feedback.
6 replies
-
Closing due to no activity! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I created a form operation which has 2 fields. A text and a dropzone.
Fields in Crud controller is built like
$this->crud->addField([
'name' => 'users_documents',
'label' => 'Document Info',
'new_item_label' => 'New Document',
'type' => 'repeatable',
'fields' => [
[
'name' => 'documents',
'type' => 'dropzone',
'label' => 'upload a file',
"withFiles" => true,
],
[
'label' => "Document Description",
'type' => 'text',
'name' => 'description',
],
],
This shows the field correctly. When I try to upload a file it just shows "[Object object]" under the field and the network console shows that an error is sent back from the upload handler "dropzone/upload" with the message of Cannot parse field name.
So I was wondering if anyone else already had this problem and if so how they fixed it.
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions