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 ...
随机推荐
- 博客终于开通了happy
HelloWorld! 在我不懈的申请下,我的博客终于在第4次申请后成功开通了! 作为一个毕业两年的码农,现在才开始想要记录一些东西,似乎有点晚 -_-! 希望多年以后可以在这看到我长长的足迹!
- URL,URLConnection,HttPURLConnection的使用
URLConnection与HttPURLConnection都是抽象类,无法直接实例化对象.其对象主要通过URL的openconnection方法获得. 值得注意的是:1.openConnectio ...
- STM32F103控制两个步进电机按照一定转速比运动
这个暑假没有回家,在学校准备九月份的电子设计竞赛.今天想给大家分享一下STM32定时器控制两个步进电机按照一定速度比转动的问题. 这次做的05年的电子设计竞赛题目,运动悬挂系统..本实验是控制两个步进 ...
- Ubuntu下Eclipse搭建ARM开发环境
第一步:安装JRE 和 Eclipse 详细步骤请参考:http://blog.csdn.net/ex_net/article/details/7251664 第二步:安装arm-linux-gcc ...
- vmware重装系统后虚拟机实例文件*.vmdk重用
如题:vmware重装系统后自定义的:虚拟机名称*.vmdk文件重用. 一.问题描述 系统磁盘坏道,装不上系统直接换了硬盘,但是新装的Vmware不能够通过open方式打开“自定义*.vmdk”(这个 ...
- python爬爬爬之单网页html页面爬取
python爬爬爬之单网页html页面爬取 作者:vpoet mail:vpoet_sir@163.com 注:随意copy 不用告诉我 #coding:utf-8 import urllib2 Re ...
- 栈ADT的链表实现
/* 栈ADT链表实现的类型声明 */ struct Node; typedef struct Ndoe *PtrToNode; typedef PtrToNode Stack; struct Nod ...
- 网易云课堂_C++程序设计入门(上)_第3单元:更上一层楼 – 超越C的语法_第3单元作业【3】-在线编程(难度:中;10分)
1 本题要求实现两个重载的swap函数,每个swap函数都可交换3个整数a,b,c的值.将a的值存入b,b的值存入c,c的值存入a, 并且返回三个整数中最大的数的值.例如a,b,c的值为1,2,3,则 ...
- 使用ashx一般处理程序,读取不到Session的问题
一般的处理程序文件里面是用不了Session的,必须得实现Session接口才可以用. public class RandomCode : IHttpHandler, System.Web.Sessi ...
- Sumsets(3sum问题,枚举d,c二分a+b)
Sumsets Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9997 Accepted: 2736 Descripti ...