laravel-admin-extensions / cropper

MIT License
73 stars 36 forks source link

编辑时出现 An invalid form control with name='' is not focusable. 错误 #33

Open tanchengjin opened 4 years ago

tanchengjin commented 4 years ago

添加了required()

$form->cropper('image', __('图片'))->cRatio(350,350)->required();

tanchengjin commented 4 years ago

添加required()之后就只能重新上传图片后才能提交

MamaikAn commented 3 years ago

This problem probably came with fddfccb85050a2684f57fb103c65920ee09642be, in this lines https://github.com/laravel-admin-extensions/cropper/blob/fddfccb85050a2684f57fb103c65920ee09642be/resources/views/cropper.blade.php#L8-L11 I've fixed it by simply cutting {!! attributes !!} from the first input and paste it into the second. I hope @EVA09 will make it clear, if is it OK or not.

UPD: cRatio won't work with this fix.

supgeek-rod commented 3 months ago

have same bug