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.7.12 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.7.11 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.7.10 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.7.9 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.7.3 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.7.2 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.7.1 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.7.0 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.38 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.37 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.36 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.35 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.34 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.33 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.32 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.31 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.30 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.29 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.28 app/views/showcase/previews/field_partials/_about_field_partials.erb
bullet_train-themes-light-1.6.27 app/views/showcase/previews/field_partials/_about_field_partials.erb