<commit_before>
<div class="well form-actions">
  <a href="#" class="btn btn-primary left" data-code="show">
    toggle code examples for each form element.
  </a>
  <a href='#' id='toggle-form' class='btn right'>
    toggle between vertical and horizontal form
  </a>
</div>

<%= simple_form_for @article, :html => { :class => 'form-horizontal' } do |f| %>
<pre class='prettyprint linenums lang-rb'>
# If you generated the SimpleForm configuration with `--bootstrap`, the `simple_form_for` helper will use the bootstrap wrapper by default.
simple_form_for(@article, :html =&gt; { :class =&gt; 'form-horizontal' }) do |f|
</pre>

  <% if f.error_notification %>
    <div class="alert alert-error fade in">
      <a class="close" data-dismiss="alert" href="#">&times;</a>
      <%= f.error_notification %>
    </div>
  <% end %>

  <legend>Article</legend>
  <%= f.input :name, :input_html => { :class => "span6" },
              :hint => "add your article title here" %>
<pre class='prettyprint linenums lang-rb'>
  # You can use the same `span*` classes from the grid system.
  f.input :name, :input_html =&gt; { :class =&gt; "span6" }, :hint =&gt; "add your article title here"
</pre>

  <%= f.input :name, :wrapper => :prepend, :label => false do %>
    <%= content_tag :span, "Name", :class => "add-on" %>
    <%= f.input_field :name %>
  <% end %>

<pre class='prettyprint linenums lang-rb'>
  # Use different wrappers to use other elements from Bootstrap, like a 'prepend' box.
  f.input :name, :wrapper =&gt; :prepend, :label =&gt; false do
    content_tag :span, "Name", :class =&gt; "add-on"
    f.input_field :name
  end
</pre>

  <%= f.input :published, :as => :boolean %>

<pre class='prettyprint linenums lang-rb'>
  f.input :published, :as =&gt; :boolean
</pre>

  <%= f.input :content_type, :collection => content_type_options, :as => :check_boxes, :label => 'Stacked checkboxes' %>
<pre class='prettyprint linenums lang-rb'>
  f.input :content_type, :collection =&gt; content_type_options, :as =&gt; :check_boxes
</pre>

  <%= f.input :content_type, :collection => content_type_options, :as => :check_boxes, :item_wrapper_class => 'inline', :label => 'Inline checkboxes' %>
<pre class='prettyprint linenums lang-rb'>
  f.input :content_type, :collection =&gt; content_type_options, :as =&gt; :radio_buttons, :item_wrapper_class =&gt; &#x27inline&#x27;
</pre>

  <%= f.input :content_type, :collection => content_type_options, :as => :radio_buttons, :label => 'Stacked radios' %>

<pre class='prettyprint linenums lang-rb'>
  f.input :content_type, :collection =&gt; content_type_options, :as =&gt; :radio_buttons
</pre>


  <%= f.input :content_type, :collection => content_type_options, :as => :radio_buttons, :item_wrapper_class => 'inline', :label => 'Inline radios' %>

<pre class='prettyprint linenums lang-rb'>
  f.input :content_type, :collection =&gt; content_type_options, :as =&gt; :radio_buttons, :item_wrapper_class =&gt; &#x27;inline&#x27;
</pre>

  <%= f.input :content_type, :collection => content_type_options,
              :hint => "multiple select", :input_html => { :multiple => true } %>
<pre class='prettyprint linenums lang-rb'><commit_msg>Corrected code example for inline checkboxes<commit_after><div class="well form-actions">
  <a href="#" class="btn btn-primary left" data-code="show">
    toggle code examples for each form element.
  </a>
  <a href='#' id='toggle-form' class='btn right'>
    toggle between vertical and horizontal form
  </a>
</div>

<%= simple_form_for @article, :html => { :class => 'form-horizontal' } do |f| %>
<pre class='prettyprint linenums lang-rb'>
# If you generated the SimpleForm configuration with `--bootstrap`, the `simple_form_for` helper will use the bootstrap wrapper by default.
simple_form_for(@article, :html =&gt; { :class =&gt; 'form-horizontal' }) do |f|
</pre>

  <% if f.error_notification %>
    <div class="alert alert-error fade in">
      <a class="close" data-dismiss="alert" href="#">&times;</a>
      <%= f.error_notification %>
    </div>
  <% end %>

  <legend>Article</legend>
  <%= f.input :name, :input_html => { :class => "span6" },
              :hint => "add your article title here" %>
<pre class='prettyprint linenums lang-rb'>
  # You can use the same `span*` classes from the grid system.
  f.input :name, :input_html =&gt; { :class =&gt; "span6" }, :hint =&gt; "add your article title here"
</pre>

  <%= f.input :name, :wrapper => :prepend, :label => false do %>
    <%= content_tag :span, "Name", :class => "add-on" %>
    <%= f.input_field :name %>
  <% end %>

<pre class='prettyprint linenums lang-rb'>
  # Use different wrappers to use other elements from Bootstrap, like a 'prepend' box.
  f.input :name, :wrapper =&gt; :prepend, :label =&gt; false do
    content_tag :span, "Name", :class =&gt; "add-on"
    f.input_field :name
  end
</pre>

  <%= f.input :published, :as => :boolean %>

<pre class='prettyprint linenums lang-rb'>
  f.input :published, :as =&gt; :boolean
</pre>

  <%= f.input :content_type, :collection => content_type_options, :as => :check_boxes, :label => 'Stacked checkboxes' %>
<pre class='prettyprint linenums lang-rb'>
  f.input :content_type, :collection =&gt; content_type_options, :as =&gt; :check_boxes
</pre>

  <%= f.input :content_type, :collection => content_type_options, :as => :check_boxes, :item_wrapper_class => 'inline', :label => 'Inline checkboxes' %>
<pre class='prettyprint linenums lang-rb'>
  f.input :content_type, :collection =&gt; content_type_options, :as =&gt; :check_boxes, :item_wrapper_class =&gt; &#x27inline&#x27;
</pre>

  <%= f.input :content_type, :collection => content_type_options, :as => :radio_buttons, :label => 'Stacked radios' %>

<pre class='prettyprint linenums lang-rb'>
  f.input :content_type, :collection =&gt; content_type_options, :as =&gt; :radio_buttons
</pre>


  <%= f.input :content_type, :collection => content_type_options, :as => :radio_buttons, :item_wrapper_class => 'inline', :label => 'Inline radios' %>

<pre class='prettyprint linenums lang-rb'>
  f.input :content_type, :collection =&gt; content_type_options, :as =&gt; :radio_buttons, :item_wrapper_class =&gt; &#x27;inline&#x27;
</pre>

  <%= f.input :content_type, :collection => content_type_options,
              :hint => "multiple select", :input_html => { :multiple => true } %>
<pre class='prettyprint linenums lang-rb'>
{'fraction_non_alphanumeric': 0.17663639210773568, 'fraction_numerical': 0.0031318509238960224, 'mean_word_length': 4.5977212971078005, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 0, '>': 145, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6938810', 'n_tokens_mistral': 2271, 'n_tokens_neox': 2093, 'n_words': 607}