We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
经测试,直接使用浏览器的审查元素,删除掉disable或者readonly属性,然后提交,该字段的值竟然保存成功了。已经测试可以直接通过这个方法修改用户的用户名,这在某些需要严格权限认证的地方不够严谨,建议给Form的removeIgnoredFields方法加上对这些字段的筛查
removeIgnoredFields
public function removeIgnoredFields($input) { Arr::forget($input, $this->ignored); /** @var Field $field */ foreach ($this->builder->fields() as $field){ if ($field instanceof Field\Display || $field->hasAttribute('disabled') || $field->hasAttribute('readonly')){ Arr::forget($input, $field->column()); } } return $input; }
The text was updated successfully, but these errors were encountered:
这个是浏览器的特性,你可以自己处理,display是不能保存的因为display就只是个div而已。
Sorry, something went wrong.
display虽然是div,但可以审查元素修改为text提交,然后后端是依旧接受这个字段并允许修改了 我将个人设置的name标签复制一下,改成username 可以提交修改用户名
自动忽略Display 、Text readonly以及Text disable类型表单 #310
b6a187b
感谢建议,已支持这个功能
No branches or pull requests
Description:
经测试,直接使用浏览器的审查元素,删除掉disable或者readonly属性,然后提交,该字段的值竟然保存成功了。已经测试可以直接通过这个方法修改用户的用户名,这在某些需要严格权限认证的地方不够严谨,建议给Form的
removeIgnoredFields
方法加上对这些字段的筛查Steps To Reproduce:
The text was updated successfully, but these errors were encountered: