Closed phuchung2399 closed 1 year ago
Explain in more detail what you really want.
Explain in more detail what you really want.
Yes. I want to show default image when each of us create something new when using Form.
For example, I want to create a new user. When I click the create button, $form->image('avatar') will automatically display an image that I have defaulted.
It will look like this:
I can't currently assign a default value to $form->image('avatar').
I have tried using: $form->image('avatar')->default('image-url') $form->image('avatar')->value('image-url')
however it doesn't work
-- Please help me, thanks.
hey,bro
$form->image('index', __('图片上传'))->attribute('data-initial-preview', $url);
hey,bro
$form->image('index', __('图片上传'))->attribute('data-initial-preview', $url);
Thanks bro. I have resolved issue with your solution.
Description:
I would like to show default image in $form->image('avatar').
Now I can not show default image when I create new record.![image](https://user-images.githubusercontent.com/39484500/231654244-5281434d-70e6-4c03-a536-565b8dbcb456.png)
I want to show![image](https://user-images.githubusercontent.com/39484500/231654621-8e897fe6-e320-403b-aa71-25350f6001b9.png)
Please help me, thanks.