Sha256: b2c49969155221b4bc5444b6655ee1a539a35524a908992a9dcac54e404e6330

Contents?: true

Size: 1.45 KB

Versions: 116

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

116 entries across 116 versions & 1 rubygems

Version Path
bullet_train-themes-light-1.15.0 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.14.2 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.14.1 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.14.0 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.13.0 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.12.3 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.12.2 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.12.1 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.12.0 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.11.0 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.10.0 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.9.0 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.8.5 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.8.4 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.8.3 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.8.2 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.8.1 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.8.0 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.7.23 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.7.22 app/views/showcase/previews/field_partials/_about_field_partials.erb