Extjs4.1 - 提交隐藏字段中的有效表单,allowblank为false

fre*_*yle 2 extjs extjs4.1

我有一个包含动态项目的表单面板.有些项目隐藏了如下例子:

        items: [{
            xtype: 'textfield',
            fieldLabel: 'Field 1',
            name: 'theField'
        },{
            xtype: 'textfield',
            fieldLabel: 'Field 2',
            name: 'theField'
        },{
            xtype: 'textfield',
            fieldLabel: 'Field 3',
            name: 'theField',
            hidden: true,
            allowBlank : false
        }]
Run Code Online (Sandbox Code Playgroud)

但是,当我提交我的表格时

            if (form.isValid()) {
                alert('submit');
            }else alert('fail');
Run Code Online (Sandbox Code Playgroud)

这将检查所有字段,我的表单将不会提交.
无论如何都有效表格(只显示字段)?该怎么做谢谢

以下是我查看http://jsfiddle.net/jZYcQ/的示例

Eva*_*oli 6

正如您所说,隐藏的字段仍将被验证.相反,您应该禁用该字段,这意味着它将不会被提交,但也不会包含在验证中.