-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image field in repeatable #2709
Comments
@maig81 thanks a lot for the bug report! Indeed - it was a known bug, that I think you'll be glad to know I've just pushed a fix for this - 4.1 now has both Cheers! |
Great :) Glad you solved it so fast 👍 Thanks |
Bug report
What I did
Added "image" field in repeatable
What I expected to happen
Show the preview of the image after I made the save function in my model. My model json_decodes the repeatable fields, iterates through them, and saves the images if any are uploaded. Then it changes the image data to the URL and saves the JSON to the database.
What happened
There was no image preview, as the JS does not fill the "src" attribute of the field.
What I've already tried to fix it
I have added JS in "newRepeatableElement()" function in the repeatable.blade.php:
I am sure this is not best practice, so I`m not committing it under a pull request :)
Backpack, Laravel, PHP, DB version
When I run
php artisan backpack:version
the output is:PHP VERSION:
PHP 7.3.1 (cli) (built: Jan 9 2019 22:20:52) ( ZTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies
LARAVEL VERSION:
v6.18.10@9177744ccdd8d5db970fdff2383fe89c2e94aabe
BACKPACK VERSION:
4.1.x-dev@78a89604e4d8571671bb9ec6f2d626a1e8150078
The text was updated successfully, but these errors were encountered: