magento后台加form表单页面变形
来源:互联网 发布:阿里旺旺群发软件 编辑:程序博客网 时间:2024/06/13 04:41
在magento二次开发时,经常需要自己加一些模具,来满足自己的特定需求。
也许不止content一个单词,其他能引起问题的单词暂未发现。
创建module步骤请参考http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/custom_module_with_custom_database_table
转载请注明出处!
添加Block/里面的文档时,需要特别注意一些地方,其中包括在Form.php中addField的时候,示例代码如下:
$fieldset->addField('todo', 'select', array('label' => Mage::helper('education')->__('Todo'),'name' => 'todo','values' => array(array('value' => 'do','label' => Mage::helper('education')->__('Do'),),array('value' => 'dont','label' => Mage::helper('education')->__('Dont'),),array('value' => '0','label' => Mage::helper('education')->__('Please select'),),),));$fieldset->addField('subject', 'text', array('label' => Mage::helper('education')->__('Subject'),'name' => 'subject',));$fieldset->addField('content', 'editor', array('label' => Mage::helper('education')->__('Content'),'name' => 'content','style' => 'width:600px; height:400px;','wysiwyg' => true,));你能发现有这段代码什么问题吗?它确实有问题,问题就在content这个单词,在type为editor的情况下,如果id和name为content,页面就会变形,猜测原因可能是content和editor编辑器的样式定义有冲突。
也许不止content一个单词,其他能引起问题的单词暂未发现。
修改之后code如下:
$fieldset->addField('contents', 'editor', array('label' => Mage::helper('education')->__('Content'),'name' => 'contents','style' => 'width:600px; height:400px;','wysiwyg' => true,));
问题解决!创建module步骤请参考http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/custom_module_with_custom_database_table
转载请注明出处!
- magento后台加form表单页面变形
- 在 magento产品页面显示评论表单(review form)
- 页面ajax提交form 表单 以及后台接收
- Magento Admin Form表单元素大全
- Magento后台表单字段添加备注
- Magento后台新建表单上传文件
- table表格加form表单实例及注册页面的搭建
- 解决Error:ftl页面通过form提交表单,后台java类接收的值为null
- spring mvc IE8下JSP页面form表单提交后台不能获取值
- Form表单上传大文件,无法进入后台Action,页面提示404.
- jQuery Form 页面表单提交
- Form表单做登陆页面
- Magento后台订单页面增加邮箱项
- Magento任意页面添加Contact Us表单
- Magento任意页面添加Contact Us表单
- form表单加js或ajax验证
- extjs form表单 及 后台保存数据
- form提交表单 后台乱码问题
- 性能测试Overview
- 探讨gui_upload(gui_download)的两个参数
- 一个Linux虚拟机上Oracle数据库磁盘空间不足的解决办法
- 一些随笔
- ubuntu 11.10
- magento后台加form表单页面变形
- 观察者模式的小例子
- 常用查看Linux系统信息命令
- Mac中安装ANT全过程
- 下属必懂的领导攻心术
- Python实现的守护进程
- 三星超越苹果成为全球智能机老大
- 如何彻底删除已经不存在的数据文件?
- 神奇的printf之一