我在系统后台创建了表单但是只能使用系统生成的这个页面提交才不 迅睿框架 更新 2019-10-23 12:11:21 shenzx 我在系统后台创建了表单,但是只能使用系统生成的这个页面提交才不受限制,在其他页面需要使用怎么生产系统需要的表单令牌?系统验证是否是跨站验证是这个字段,但是在其他页面使用了{$form}也不会生成表单令牌。我完全把系统生成的前端代码复制过来也无法使用表单。这个是我在其他网站看到的,没有使用表单令牌,只是传了一个验证码就可以用了,但是和我使用的版本不一样,表单的input框是自己手写,也没有使用{$form}。
这个代码发一下
var postData = { data: { title: askFormUserName, dianhua: askFormUserPhone, youxiang: askFormUserEmail, xuqiujianshu: askFormUserDescription, }, code: askFormUserCode };var postData = { data: { title: askFormUserName, dianhua: askFormUserPhone, youxiang: askFormUserEmail, xuqiujianshu: askFormUserDescription, }, {csrf_token()}: "{csrf_hash()}", code: askFormUserCode };手工打字。。。<input type="hidden" name="{csrf_token()}" value="{csrf_hash()}" />