【问题标题】:Meteor -> aldeed->Auto-form How to customize checkboxMeteor -> aldeed->Auto-form 如何自定义复选框
【发布时间】:2015-04-26 05:33:06
【问题描述】:

我有以下复选框的架构:

'category.isParent': {
    type: Boolean
   ,defaultValue: false
}

以下是复选框的自动表单代码:

    <div class="row">
        <div class="col-lg-8 col-md-offset-5 padding-left-0">
          {{> afFieldInput  name='category.isParent' id='isParent' template="plain"}}
        </div>
   </div>

以下是生成的源代码(复制自firefox)

<div class="checkbox">
<label>
  <div id="uniform-isParent" class="checker"><span><input data-schema-key="category.isParent" id="isParent" name="category.isParent" type="checkbox"></span></div>
  Is parent
</label>

我想根据自己的需要自定义这个生成的源代码。 有人可以指导我,我可以在自动表单或简单模式中执行什么操作以及如何自定义自动生成的自动生成代码。

【问题讨论】:

    标签: twitter-bootstrap meteor twitter-bootstrap-3 uniform meteor-autoform


    【解决方案1】:

    您可以通过设置字段默认属性来使用自动表单进行一些自定义。

    见:https://github.com/aldeed/meteor-autoform#putting-field-attribute-defaults-in-the-schema

    【讨论】:

      猜你喜欢
      • 2016-03-03
      • 1970-01-01
      • 1970-01-01
      • 2016-12-20
      • 2011-09-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多