Field
So many ways to input a string
Includes a Ruby component and corresponding Rails helper
RubyExample
<%= nk_form_for :session do |f| %>
<%= f.fieldset do |fs| %>
<%= fs.legend "Sign in" %>
<%= fs.description "Let's see those credentials, buddy" %>
<%= fs.group do %>
<%= f.field :email, as: :email, label: "E-mail address" %>
<%= f.field :password, as: :password %>
<%= f.field :remember_me, as: :checkbox,
description: "At least for a little bit" %>
<%= f.submit "Sign in" %>
<% end %>
<% end %>
<% end %>
Usage
| ||
---|---|---|
Property | Default | Description |
**attrs | HTML attributes for <input> element |
| ||
---|---|---|
Property | Default | Description |
legend | nil | Plain text content |
description | nil | Plain text content |
**attrs | HTML attributes for <fieldset> element |
| ||
---|---|---|
Property | Default | Description |
text | nil | Plain text content |
**attrs | HTML attributes for <legend> element |
| ||
---|---|---|
Property | Default | Description |
text | nil | Plain text content |
**attrs | HTML attributes for <div> element |
| ||
---|---|---|
Property | Default | Description |
**attrs | Arguments for NitroKit::FieldGroup.new() |
| ||
---|---|---|
Property | Default | Description |
**attrs | HTML attributes for <div> element |