无法使用Symfony2和TinyMCE提交表单 [英] Can't submit a form with Symfony2 and TinyMCE

查看:133
本文介绍了无法使用Symfony2和TinyMCE提交表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个由TinyMCE Javascript库丰富的textarea表单。当Javascript库启用时,如果我按下提交按钮,页面不会改变!如果我禁用图书馆,一切正常!
可以观察到库的使用不正确(我使用的是傻瓜教程)。不过,我认为这与我用来开发网站的框架有关:Symfony2。



有什么想法?

解决方案

对不起,已在此处找到 CKeditor strong>和 Symfony2



实际上,问题是由于textarea是在控制器内用 required = true 默认值。然后,我只将将textarea小部件设置为false ,现在它可以工作!实际上,TinyMCE库(就像其他人一样)只是将默认的textarea设置为隐藏,并将其丰富的textarea添加到html页面。所以,浏览器仍然需要一些textarea的textarea值时才能传递!


I have a form with a textarea enriched by the TinyMCE Javascript library. When the Javascript library is enabled, then if I press the submit button the page don't change! If I disable the library, everything works right! One may observe that the library is not used properly (I'm using the simplest example from the for dummies tutorial). However, I think that it is something related with the framework I'm using to develop the website: Symfony2.

Any idea?

解决方案

Sorry for the question, the answer has been found here in a post dedicated to the CKeditor and Symfony2.

In practice, the problem is due to the fact that the textarea was created inside the controller with a required=true value by default. Then, I only set the textarea widget to false and now it works!

In fact, the TinyMCE library (like the others) simply makes the default textarea as hidden and add its rich textarea to the html page. So, the browser still need some value for the textarea that cannot be passed when the textarea is hydden!

这篇关于无法使用Symfony2和TinyMCE提交表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆