Sha256: 5aa6921f47a281305626dcedd437845c269cc9fd18ed178ac417d2fb617cad21
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
# LabelledForm Adds `label:` option to Rails form helpers. ## Usage Works like you'd expect, or at least, works like I'd expect! Examples: ```slim form_with :user do |form| # Prepends label to field and infers label text form.text_field :email, label: true # <label for="user_email">Email</label> # <input type="text" name="user[email]" id="user_email"> # Supports specifying different label text form.text_field :name, label: "Full name" # <label for="user_name">Full name</label> # <input type="text" name="user[name]" id="user_name"> # Appends label to field for radio buttons and checkboxes form.radio_button :gender, "Male", label: true # <input type="radio" name="user[gender]" value="Male" id="user_gender_male"> # <label for="user_gender_male">Male</label> end ``` ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/botandrose/labelled_form. ## License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
labelled_form-0.1.0 | README.md |