Sha256: b2c49969155221b4bc5444b6655ee1a539a35524a908992a9dcac54e404e6330

Contents?: true

Size: 1.45 KB

Versions: 119

Compression:

Stored size: 1.45 KB

Contents

<% showcase.description do %>
  When you're building forms, use Bullet Train's Field Partials for your form fields. They DRY-up all the presentation logic without needing a third-party dependency like Formtastic.
  <br/>
  <br/>
  Read much more about them in the extensive <a href="https://bullettrain.co/docs/field-partials" target="_blank">developer documentation</a>.
<% end %>

<% form_with model: Scaffolding::CompletelyConcrete::TangibleThing.new, url: "#" do |form| %>
  <% yield form %>
<% end %>

<%# To display further options use `showcase.options.x` as options with a block will clear the old options. See `_options.html.erb` for an example. %>
<% showcase.options do |o| %>
  <% o.required :form, "Reference to the form object", type: "ActionView::Helpers::FormBuilder" %>
  <% o.required :method, "Attribute of the model" %>
  <% o.optional :options, "Options passed directly to the underlying Rails form field helper.", default: {} %>
  <% o.optional :other_options, "Additional options for things like hiding labels, displaying specific error messages, etc.", default: {} %>
  <% o.optional "other_options[:icon]", "Display an icon." %>
  <% o.optional "other_options[:label]", "Display a specific field label." %>
  <% o.optional "other_options[:hide_label]", "Hide the field label.", default: false %>
  <% o.optional "other_options[:help]", "Display a specific help string." %>
  <% o.optional "other_options[:error]", "Display a specific error string." %>
<% end %>

Version data entries

119 entries across 119 versions & 1 rubygems

Version Path
bullet_train-themes-light-1.5.1 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.5.0 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.4.11 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.4.10 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.4.9 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.4.8 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.4.7 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.4.6 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.4.5 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.4.4 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.4.3 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.4.2 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.4.1 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.4.0 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.3.25 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.3.24 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.3.23 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.3.22 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.3.21 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.3.20 app/views/showcase/previews/field_partials/_about_field_partials.erb