如何验证 sfWidgetFormTextareaTinyMCE
我使用 symfony 1.4.11。我有下一个:
$this->widgetSchema['en']['content'] = new sfWidgetFormTextareaTinyMCE(array(
'width' => 900,
'height' => 300,
'config' => 'theme_advanced_buttons1 : "cut, copy, paste, images, bold, italic, underline, justifyleft, justifycenter, justifyright , outdent, indent, bullist, numlist, undo, redo, link",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing: "false",
plugins: "images, paste",
'),array('class' => 'tinyMCE',)
);
我需要验证这一点,我尝试 sfValidatorString ,但它不起作用
I use symfony 1.4.11. And I have next:
$this->widgetSchema['en']['content'] = new sfWidgetFormTextareaTinyMCE(array(
'width' => 900,
'height' => 300,
'config' => 'theme_advanced_buttons1 : "cut, copy, paste, images, bold, italic, underline, justifyleft, justifycenter, justifyright , outdent, indent, bullist, numlist, undo, redo, link",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing: "false",
plugins: "images, paste",
'),array('class' => 'tinyMCE',)
);
I need to validte this, I try sfValidatorString ,but it is not work
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您没有正确设置您的小部件(可能也不是您的验证器)。如果您想对小部件进行分组/嵌套,您需要在容器表单中嵌入另一个表单。
编辑:
要么创建一个具有“内容”小部件的新表单,将其嵌入到父表单中,如下所示:
或者您像这样添加小部件:
具体细节实际上取决于您的用例,我可能建议您阅读此处的表格:
http://www.symfony-project.org/forms/1_2/en/(仍然与 1.4 相关)
You are not setting your widget (an probably neither your validator) correctly. If you want to group/nest widgets you need to embed another form in your container form.
EDIT:
Either you create a new form which has the 'content' widget, which you embed in the parent form like so:
Alternatively you add the widget like so:
The specifics really depend on your usecase, and I might suggest you read up on forms here:
http://www.symfony-project.org/forms/1_2/en/ (still relevant for 1.4)