Twitter bootstrap 简易引导4个单选按钮

Twitter bootstrap 简易引导4个单选按钮,twitter-bootstrap,ruby-on-rails-4,simple-form,Twitter Bootstrap,Ruby On Rails 4,Simple Form,我正在尝试用引导程序4 alpha设置简单表单,我在自定义单选按钮方面遇到了问题。我试图获得的html输出看起来很简单,但我似乎无法正确配置 目标产出: <label class="col-xs-2 col-form-label">Label</label> <div class="col-xs-10"> <label class="custom-control custom-radio"> <input id="radio1"

我正在尝试用引导程序4 alpha设置简单表单,我在自定义单选按钮方面遇到了问题。我试图获得的html输出看起来很简单,但我似乎无法正确配置

目标产出:

<label class="col-xs-2 col-form-label">Label</label>
<div class="col-xs-10">
  <label class="custom-control custom-radio">
    <input id="radio1" name="radio" type="radio" class="custom-control-input">
    <span class="custom-control-indicator"></span>
    <span class="custom-control-description">Toggle this custom radio</span>
  </label>
  <label class="custom-control custom-radio">
    <input id="radio2" name="radio" type="radio" class="custom-control-input">
    <span class="custom-control-indicator"></span>
    <span class="custom-control-description">Or toggle this other custom radio</span>
  </label>
</div>
电流输出:

<label class="col-xs-2 col-form-label radio_buttons optional">Label</label>
<div class="col-xs-10">
  <label class="custom-control custom-radio">
    <input type="hidden" name="store[payment_type]" value="">
    <span class="radio inline">
      <input class="custom-control-input radio_buttons optional" type="radio" value="true" name="store[payment_type]" id="store_payment_type_true">
      <label class="collection_radio_buttons" for="store_payment_type_true">Yes</label>
    </span>
    <span class="radio inline">
      <input class="custom-control-input radio_buttons optional" readonly="readonly" type="radio" value="false" name="store[payment_type]" id="store_payment_type_false">
      <label class="collection_radio_buttons" for="store_payment_type_false">No</label>
    </span>
    <span class="custom-control-indicator"></span>
    Payment type
  </label>
</div>
标签
对
不
支付类型
这并不遥远,但它是不正确的,目前不起作用。我似乎无法在正确的配置上着陆以获得正确的输出。我尝试将
wrap\u与
一起使用,但我需要向包装器中添加额外的元素,而且包装器类似乎只是form\u字段包装器,而不是item\u包装器

如果有人能给我指出正确的方向,那将非常有用

<label class="col-xs-2 col-form-label radio_buttons optional">Label</label>
<div class="col-xs-10">
  <label class="custom-control custom-radio">
    <input type="hidden" name="store[payment_type]" value="">
    <span class="radio inline">
      <input class="custom-control-input radio_buttons optional" type="radio" value="true" name="store[payment_type]" id="store_payment_type_true">
      <label class="collection_radio_buttons" for="store_payment_type_true">Yes</label>
    </span>
    <span class="radio inline">
      <input class="custom-control-input radio_buttons optional" readonly="readonly" type="radio" value="false" name="store[payment_type]" id="store_payment_type_false">
      <label class="collection_radio_buttons" for="store_payment_type_false">No</label>
    </span>
    <span class="custom-control-indicator"></span>
    Payment type
  </label>
</div>