Skip to content
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

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

Open
tanchengjin opened this issue Jun 12, 2020 · 3 comments

Comments

@tanchengjin
Copy link

添加了required()

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

@tanchengjin
Copy link
Author

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

@MamaikAn
Copy link

MamaikAn commented Dec 26, 2020

This problem probably came with fddfccb, in this lines

<input class="cropper-file" type="file" accept="image/*" {!! $attributes !!}/>
<!-- <img class="cropper-img" {!! empty($value) ? '' : 'src="'.old($column, $value).'"' !!}> -->
<img class="cropper-img" {!! empty($value) ? '' : 'src="'.$preview.'"' !!}>
<input class="cropper-input" name="{{$name}}" value="{{ old($column, $value) }}"/>

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
Copy link

have same bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants