如何选择w2ui列表字段的forst项

时间:2018-02-27 17:58:38

标签: w2ui

我有一个带有此列表字段的w2ui表单:

...
{ field: 'field_module', type: 'list', required: true,
  html: { caption: 'Program', attr: 'size="14"', span: 3 }},
...

一旦我通过ajax加载项目(工作正常),我想预先选择该列表的第一项。 怎么做到这一点?

1 个答案:

答案 0 :(得分:0)

我找到了答案。 非常简单,即使我无法找到如何以数字方式选择第一项

form.record.field_module = {id:' - ALL - ',text:' - ALL - '};