Sha256: b2c49969155221b4bc5444b6655ee1a539a35524a908992a9dcac54e404e6330

Contents?: true

Size: 1.45 KB

Versions: 107

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

107 entries across 107 versions & 1 rubygems

Version Path
bullet_train-themes-light-1.6.26 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.25 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.24 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.23 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.22 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.21 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.20 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.19 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.18 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.17 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.16 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.15 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.14 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.13 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.12 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.11 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.10 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.9 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.8 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.7 app/views/showcase/previews/field_partials/_about_field_partials.erb