252 Unstar Star 475 Fork 257

稻米 / LigerUIJavaScript

如何在表单中创建单选按钮?

Closed
静心天涯  Opened this issue

看了很久,也看了一下代码,可是没有想到,如何使用以下创建方式,在表单中添加单选按钮?

$(function ()
        {
            //创建表单结构 
            form = $("#form2").ligerForm({
                inputWidth: 170, labelWidth: 90, space: 40,
                
                fields: [
                { name: "ProductID", type: "hidden" },
                { display: "日期 ", name: "AddTime", newline: true, type: "date", validate: { required: true, minlength: 5 } },
                { display: "折扣", name: "QuantityPerUnit", newline: true, type: "number", validate: { required: true, minlength: 5 } },
                { display: "单价", name: "UnitPrice", newline: true, type: "number",editor:{readonly:true}, validate: { required: true, minlength: 5 } },
                { display: "库存量", name: "UnitsInStock", newline: true, type: "digits", group: "库存", groupicon: groupicon },
                { display: "订购量", name: "UnitsOnOrder", newline: true, type: "digits" },
                { display: "采购量", name: "UnitsOnOrder2", newline: true, type: "spinner" },
                { display: "选择公司", name: "Company", newline: true, type: "popup" },
                { display: "地区", name: "Area", newline: false, type: "select", editor: {data:area_data} },
                { display: "备注", name: "Remark", newline: true, type: "text", width: 470, validate: { required: true, minlength: 5 } },
                { display: "备注", name: "Remark", newline: true, type: "text", width: 470 }
                ]
            });
        });```
77688 lovetiany 1578916536 total 1 participants

Comments (2)

77688 lovetiany 1578916536
静心天涯 2015-06-09 23:20

已解决,看代码发现传 type:"radiolist" 接可以了

77688 lovetiany 1578916536
静心天涯 2015-06-09 23:20

Status changed to closed

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
JavaScript
1
https://gitee.com/ligerui/LigerUI.git
git@gitee.com:ligerui/LigerUI.git
ligerui
LigerUI
LigerUI

Search

131423 f1aaba0b 1899542 094922 1c74bed3 1899542