magento中的各种form标签
1. Text Field
$fieldset->addField('title', 'text', array(
'label' => Mage::helper('form')->__('Title3'),
'class' => 'required-entry',
'required' => true,
'name' => 'title',
'onclick' => "alert('on click');",
'onchange' => "alert('on change');",
'style' => "border:10px",
'value' => 'hello !!',
'disabled' => false,
'readonly' => true,
'after_element_html' => '<small>Comments</small>',
'tabindex' => 1
));
2. Time
$fieldset->addField('time', 'time', array(
'label' => Mage::helper('form')->__('Time'),
'class' => 'required-entry',
'required' => true,
'name' => 'title',
'onclick' => "",
'onchange' => "",
'value' => '12,04,15',
'disabled' => false,
'readonly' => false,
'after_element_html' => '<small>Comments</small>',
'tabindex' => 1
));
3. TextArea
$fieldset->addField('textarea', 'textarea', array(
'label' => Mage::helper('form')->__('TextArea'),
'class' => 'required-entry',
'required' => true,
'name' => 'title',
'onclick' => "",
'onchange' => "",
'value' => '<b><b/>',
'disabled' => false,
'readonly' => false,
'after_element_html' => '<small>Comments</small>',
'tabindex' => 1
));
3. Submit Button
$fieldset->addField('submit', 'submit', array(
'label' => Mage::helper('form')->__('Submit'),
'required' => true,
'value' => 'Submit',
'after_element_html' => '<small>Comments</small>',
'tabindex' => 1
));
3. DropDown
$fieldset->addField('select', 'select', array(
'label' => Mage::helper('form')->__('Select'),
'class' => 'required-entry',
'required' => true,
'name' => 'title',
'onclick' => "",
'onchange' => "",
'value' => '1',
'values' => array('-1'=>'Please Select..','1' => 'Option1','2' => 'Option2', '3' => 'Option3'),
'disabled' => false,
'readonly' => false,
'after_element_html' => '<small>Comments</small>',
'tabindex' => 1
));
$fieldset->addField('select2', 'select', array(
'label' => Mage::helper('form')->__('Select Type2'),
'class' => 'required-entry',
'required' => true,
'name' => 'title',
'onclick' => "",
'onchange' => "",
'value' => '4',
'values' => array(
'-1'=>'Please Select..',
'1' => array(
'value'=> array(array('value'=>'2' , 'label' => 'Option2') , array('value'=>'3' ,
'label' =>'Option3') ),
'label' => 'Size'
),
'2' => array(
'value'=> array(array('value'=>'4' , 'label' => 'Option4') , array('value'=>'5' ,
'label' =>'Option5') ),
'label' => 'Color'
),
),
'disabled' => false,
'readonly' => false,
'after_element_html' => '<small>Comments</small>',
'tabindex' => 1
));
4. Radio Button
$fieldset->addField('radio', 'radio', array(
'label' => Mage::helper('form')->__('Radio'),
'name' => 'title',
'onclick' => "",
'onchange' => "",
'value' => '1',
'disabled' => false,
'readonly' => false,
'after_element_html' => '<small>Comments</small>',
'tabindex' => 1
));
$fieldset->addField('radio2', 'radios', array(
'label' => Mage::helper('form')->__('Radios'),
'name' => 'title',
'onclick' => "",
'onchange' => "",
'value' => '2',
'values' => array(
array('value'=>'1','label'=>'Radio1'),
array('value'=>'2','label'=>'Radio2'),
array('value'=>'3','label'=>'Radio3'),
),
'disabled' => false,
'readonly' => false,
'after_element_html' => '<small>Comments</small>',
'tabindex' => 1
));
5. Password Field
$fieldset->addField('password', 'password', array(
'label' => Mage::helper('form')->__('Password'),
'class' => 'required-entry',
'required' => true,
'name' => 'title',
'onclick' => "",
'onchange' => "",
'style' => "",
'value' => 'hello !!',
'disabled' => false,
'readonly' => false,
'after_element_html' => '<small>Comments</small>',
'tabindex' => 1
));
$fieldset->addField('obscure', 'obscure', array(
'label' => Mage::helper('form')->__('Obscure'),
'class' => 'required-entry',
'required' => true,
'name' => 'obscure',
'onclick' => "",
'onchange' => "",
'style' => "",
'value' => '123456789',
'after_element_html' => '<small>Comments</small>',
'tabindex' => 1
));
6. Note
$fieldset->addField('note', 'note', array(
'text' => Mage::helper('form')->__('Text Text'),
));
7. Multiselect
$fieldset->addField('multiselect2', 'multiselect', array(
'label' => Mage::helper('form')->__('Select Type2'),
'class' => 'required-entry',
'required' => true,
'name' => 'title',
'onclick' => "return false;",
'onchange' => "return false;",
'value' => '4',
'values' => array(
'-1'=> array( 'label' => 'Please Select..', 'value' => '-1'),
'1' => array(
'value'=> array(array('value'=>'2' , 'label' => 'Option2') , array('value'=>'3' ,
'label' =>'Option3') ),
'label' => 'Size'
),
'2' => array(
'value'=> array(array('value'=>'4' , 'label' => 'Option4') , array('value'=>'5' ,
'label' =>'Option5') ),
'label' => 'Color'
),
),
'disabled' => false,
'readonly' => false,
'after_element_html' => '<small>Comments</small>',
'tabindex' => 1
));
8. Multiline
$fieldset->addField('multiline', 'multiline', array(
'label' => Mage::helper('form')->__('Multi Line'),
'class' => 'required-entry',
'required' => true,
'name' => 'title',
'onclick' => "",
'onchange' => "",
'style' => "border:10px",
'value' => 'hello !!',
'disabled' => false,
'readonly' => true,
'after_element_html' => '<small>Comments</small>',
'tabindex' => 1
));
9. Link
$fieldset->addField('link', 'link', array(
'label' => Mage::helper('form')->__('Link'),
'style' => "",
'href' => 'www.excellencemagentoblog.com',
'value' => 'Magento Blog',
'after_element_html' => ''
));
10. Label
$fieldset->addField('label', 'label', array(
'value' => Mage::helper('form')->__('Label Text'),
));
Image Upload
$fieldset->addField('image', 'image', array(
'value' => 'http://www.excellencemagentoblog.com/wp-content/themes/excelltheme/images/logo.png',
));
11. File Upload
$fieldset->addField('file', 'file', array(
'label' => Mage::helper('form')->__('Upload'),
'value' => 'Uplaod',
'disabled' => false,
'readonly' => true,
'after_element_html' => '<small>Comments</small>',
'tabindex' => 1
));
12. Date
$fieldset->addField('date', 'date', array(
'label' => Mage::helper('form')->__('Date'),
'after_element_html' => '<small>Comments</small>',
'tabindex' => 1,
'image' => $this->getSkinUrl('images/grid-cal.gif'),
'format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)
));
13. Checkbox
$fieldset->addField('checkbox', 'checkbox', array(
'label' => Mage::helper('form')->__('Checkbox'),
'name' => 'Checkbox',
'checked' => false,
'onclick' => "",
'onchange' => "",
'value' => '1',
'disabled' => false,
'after_element_html' => '<small>Comments</small>',
'tabindex' => 1
));
$fieldset->addField('checkboxes', 'checkboxes', array(
'label' => Mage::helper('form')->__('Checkboxs'),
'name' => 'Checkbox',
'values' => array(
array('value'=>'1','label'=>'Checkbox1'),
array('value'=>'2','label'=>'Checkbox2'),
array('value'=>'3','label'=>'Checkbox3'),
),
'onclick' => "",
'onchange' => "",
'value' => '1',
'disabled' => false,
'after_element_html' => '<small>Comments</small>',
'tabindex' => 1
));
magento中的各种form标签的更多相关文章
- Dev中控件的js事件代码放在form标签中存在问题
Dev中控件的js事件代码放在form标签中会获取不到(head标签中有其他js代码,未验证是否是这个问题)
- 润乾报表JSF FORM 标签中使用填报表解决方案
需求 润乾报表的标签需要在jsf页面中和其他填报控件一起使用,润乾报表负责展现录入部分数据,并且这部分数据和页面的其它控件的数据存在前台和后台的交互. 问题 润乾报表在前台会生成自己的form, ...
- s:form标签
2017-01-07 17:43:18 基本的用法 <!-- Action类必须有一个无参的构造器,因为在执行action方法之前,拦截器已经创建了一个"空"的Action对 ...
- springmvc的form标签
1.要使用Spring MVC提供的表单标签,首先需要在视图页面添加: <%@ taglib prefix="form" uri="http://www.sprin ...
- 上传图片HTML <form> 标签的 method 属性
<!DOCTYPE HTML><html><body> <form action="/example/html5/demo_form.asp&quo ...
- 关于form标签,你该知道
有没有发现,自己在写模板的时候很少使用form元素,一来form和table总是那么傻傻分不清楚:二来form的特性理解不清楚,有了input.label来了直接就上,根本不用form(不知道有没有人 ...
- 在magento中如何回复客户的评论
magento — 在magento中如何回复客户的评论 发表于 2012 年 8 月 18 日 agento本身是不带 回复评论的功能的,现成的扩展(无论免费的还是商业的)也没找到,那就自己写一个吧 ...
- Magento中,调用静态块的几种方法
在后台创建一个order_form静态块Block Title :Order FormIdentifier :order_formStatus :EnabledContent :自定义内容 1.如果要 ...
- SPRING IN ACTION 第4版笔记-第六章RENDERING WEB VIEWS-002- Spring的JSP标签之form标签(<sf:input><sf:errors><sf:form>)
一. Spring offers two JSP tag libraries to help define the view of your Spring MVC web views. One tag ...
随机推荐
- js 跨域访问
错误log : XMLHttpRequest cannot load http://192.168.17.131:8080/wm/topology/links/json. No 'Access-Co ...
- Prefabs实例化 ResourceMgr
http://www.xiaobao1993.com/886.html 来源与小宝个人笔记[稍作修改] //使用 Prefabs/Resources/stone1 ResourceMgr.GetIn ...
- 【floyd存字典序路径】【HDU1385】【Minimum Transport Cost】
题目大意 求多组i到j的最短路径 并输出字典序最小.... 现在只会floyd的方式 利用dis[i][j] 表示i到j的路径中i 后面的节点 更新是比较dis[i][j] dis[i][k]. 记住 ...
- (转)ASP.NET缓存概念及其应用浅析
ASP.NET缓存概念及其应用浅析 ASP.NET缓存是什么呢?ASP.NET缓存有什么样子的特点呢?本文就向你详细介绍ASP.NET缓存的相关情况. ASP.NET缓存概念是什么呢?通常,应用程序可 ...
- C# 整个网页保存成图片
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- 常用Java Web 服务器
Java Web应用程序需要部署在Java web服务器中运行,常用的Java Web服务器有Tomcat.GlassFish.WebLogic.JBoss.WebSphere.Jetty.JRun等 ...
- [jQuery]无法获取隐藏元素(display:none)宽度(width)和高度(height)的新解决方案
在做茶城网改版工作的时候,又遇到一个新问题,我需要用jQuery写一个通过点击左右图标来翻阅图片的小插件,写好后测试可以正常运行,但是放到Tab中后发现只有第一个Tab中的代码能够正常运行,其它全部罢 ...
- C#文件读写操作
方法1:使用FileStream读写文件 using System;using System.Collections.Generic;using System.Text;using System.IO ...
- 06JS高级创建对象使用原型共享对象方法
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...
- Stat
Description 请你编程实现一个简单(渣渣)的文本编辑器,具体要求是:给定一个单词,请你输出它在给定的文章中出现的次数和第一次出现的位置.注意:匹配单词时,不区分大小写,但要求完全匹配,即给定 ...