{"id":15572970,"url":"https://github.com/shivam091/rails_bootstrap_form","last_synced_at":"2025-04-24T00:45:31.024Z","repository":{"id":165405387,"uuid":"640758986","full_name":"shivam091/rails_bootstrap_form","owner":"shivam091","description":"Rails form helpers and form builder extensions that make it super easy to build forms in Bootstrap 5 styles.","archived":false,"fork":false,"pushed_at":"2023-07-02T15:48:17.000Z","size":397,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-24T00:44:52.249Z","etag":null,"topics":["bootstrap5","date-helpers","form-builder","form-helpers","form-options-helpers","form-validation","rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shivam091.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-15T04:18:13.000Z","updated_at":"2023-08-31T07:02:00.000Z","dependencies_parsed_at":"2025-03-10T18:30:55.314Z","dependency_job_id":null,"html_url":"https://github.com/shivam091/rails_bootstrap_form","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivam091%2Frails_bootstrap_form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivam091%2Frails_bootstrap_form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivam091%2Frails_bootstrap_form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivam091%2Frails_bootstrap_form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shivam091","download_url":"https://codeload.github.com/shivam091/rails_bootstrap_form/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250540953,"owners_count":21447426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap5","date-helpers","form-builder","form-helpers","form-options-helpers","form-validation","rails","ruby"],"created_at":"2024-10-02T18:09:07.599Z","updated_at":"2025-04-24T00:45:31.006Z","avatar_url":"https://github.com/shivam091.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RailsBootstrapForm\n\n[![Ruby](https://github.com/shivam091/rails_bootstrap_form/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/shivam091/rails_bootstrap_form/actions/workflows/main.yml)\n[![Gem Version](https://badge.fury.io/rb/rails_bootstrap_form.svg)](https://badge.fury.io/rb/rails_bootstrap_form)\n[![Gem Downloads](https://img.shields.io/gem/dt/rails_bootstrap_form.svg)](http://rubygems.org/gems/rails_bootstrap_form)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/8038de955c10394ae35d/test_coverage)](https://codeclimate.com/github/shivam091/rails_bootstrap_form/test_coverage)\n[![Maintainability](https://api.codeclimate.com/v1/badges/8038de955c10394ae35d/maintainability)](https://codeclimate.com/github/shivam091/rails_bootstrap_form/maintainability)\n\n**rails_bootstrap_form** is a Rails form builder that makes it super easy to integrate [Bootstrap 5](https://getbootstrap.com/) forms into your Rails application.\n`rails_bootstrap_form`'s form helpers generate the form field and its label along with all the Bootstrap mark-up required for proper Bootstrap display.\n\n## Minimum Requirements\n\n* Ruby 3.2.2+ (https://www.ruby-lang.org/en/downloads/branches/)\n* Rails 7.0+ (https://guides.rubyonrails.org/maintenance_policy.html)\n* Bootstrap 5.0+ (https://getbootstrap.com/docs/versions/)\n\n## Installation\n\nInstall Bootstrap 5. There are many ways to do this, depending on the asset pipeline you're using in your Rails application.\nOne way is to use the gem that works with Sprockets. To do so, in a brand new Rails 7.0 application created _without_ the\n`--webpacker` option, add the `bootstrap` gem to your `Gemfile`:\n\n```ruby\ngem \"bootstrap\", \"~\u003e 5.0\"\n```\n\nAnd follow the remaining instructions in the [official bootstrap installation guide](https://github.com/twbs/bootstrap-rubygem#a-ruby-on-rails)\nfor setting up `application.scss` and `application.js`.\n\nAdd the `rails_bootstrap_form` gem to your `Gemfile`:\n\n```ruby\ngem \"rails_bootstrap_form\", \"~\u003e 0.9.8\"\n```\n\nThen:\n\n`bundle install`\n\nDepending on which CSS pre-processor you are using, adding the bootstrap form styles differs slightly.\nIf you use Rails in the default mode without any pre-processor, you'll have to add the following line to your `application.css` file:\n\n```css\n*= require rails_bootstrap_form\n```\n\nIf you followed the [official bootstrap installation guide](https://github.com/twbs/bootstrap-rubygem#a-ruby-on-rails),\nyou'll probably have switched to SCSS. In this case add the following line to your `application.scss`:\n\n```scss\n@import \"rails_bootstrap_form\";\n```\n\n## Configuration\n\n`rails_bootstrap_form` can be used without any configuration. However, `rails_bootstrap_form` does have an optional configuration file at `config/initializers/rails_bootstrap_form.rb` for setting options that affect all generated forms in an application. This configuration file is created using the generator\nby running the command:\n\n```\n$ rails generate rails_bootstrap_form:install\n```\n\nExample:\n\n```ruby\n# config/initializers/rails_bootstrap_form.rb\nRailsBootstrapForm.configure do |config|\n  # to make forms non-compliant with W3C.\n  config.default_form_attributes = {novalidate: true}\nend\n```\n\nThe current configuration options are:\n\n| Option | Default value | Description |\n|---------------------------|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `default_form_attributes` | | Set this option to `{novalidate: true}` to instruct `rails_bootstrap_form` to skip all HTML 5 validation. |\n\n## Usage\n\n### bootstrap_form_for\n\nTo get started, use the `bootstrap_form_for` helper in place of the Rails [`form_for`](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_for) helper. Here's an example:\n\n![bootstrap_form_for](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/dfc5f03b-049a-4c12-b575-8298cf5551d7)\n\n```erb\n\u003c%= bootstrap_form_for(@user) do |f| %\u003e\n  \u003c%= f.email_field :email %\u003e\n  \u003c%= f.password_field :password %\u003e\n  \u003c%= f.check_box :remember_me %\u003e\n  \u003c%= f.primary \"Log In\" %\u003e\n\u003c% end %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cform novalidate=\"novalidate\" class=\"new_user\" id=\"new_user\" action=\"/users\" accept-charset=\"UTF-8\" method=\"post\"\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003clabel class=\"form-label required\" for=\"user_email\"\u003eEmail address\u003c/label\u003e\n    \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"email\" name=\"user[email]\" id=\"user_email\"\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003clabel class=\"form-label required\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n    \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003cdiv class=\"form-check\"\u003e\n      \u003cinput class=\"form-check-input\" type=\"checkbox\" value=\"1\" name=\"user[terms]\" id=\"user_terms\"\u003e\n      \u003clabel class=\"form-check-label\" for=\"user_terms\"\u003eI accept terms and conditions\u003c/label\u003e\n      \u003cdiv class=\"form-text text-muted\"\u003eYou must first accept terms and conditions in order to continue\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cinput type=\"submit\" name=\"commit\" value=\"Log In\" class=\"btn btn-primary\" data-disable-with=\"Log In\"\u003e\n\u003c/form\u003e\n```\n\n### bootstrap_form_with\n\nTo get started, use the `bootstrap_form_with` helper in place of the Rails [`form_with`](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_with) helper. Here's an example:\n\n![bootstrap_form_with](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/06c605b9-29e2-4670-9495-0e913508d73f)\n\n```erb\n\u003c%= bootstrap_form_with(model: @user) do |f| %\u003e\n  \u003c%= f.email_field :email %\u003e\n  \u003c%= f.password_field :password %\u003e\n  \u003c%= f.check_box :remember_me %\u003e\n  \u003c%= f.primary \"Log In\" %\u003e\n\u003c% end %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cform novalidate=\"novalidate\" class=\"new_user\" id=\"new_user\" action=\"/users\" accept-charset=\"UTF-8\" method=\"post\"\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003clabel class=\"form-label required\" for=\"user_email\"\u003eEmail address\u003c/label\u003e\n    \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"email\" name=\"user[email]\" id=\"user_email\"\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003clabel class=\"form-label required\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n    \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003cdiv class=\"form-check\"\u003e\n      \u003cinput class=\"form-check-input\" type=\"checkbox\" value=\"1\" name=\"user[terms]\" id=\"user_terms\"\u003e\n      \u003clabel class=\"form-check-label\" for=\"user_terms\"\u003eI accept terms and conditions\u003c/label\u003e\n      \u003cdiv class=\"form-text text-muted\"\u003eYou must first accept terms and conditions in order to continue\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cinput type=\"submit\" name=\"commit\" value=\"Log In\" class=\"btn btn-primary\" data-disable-with=\"Log In\"\u003e\n\u003c/form\u003e\n```\n\n## Bootstrap Configuration Options\n\nHere's a list of all possible options you can pass via `bootstrap` option that can be attached to the `bootstrap_form_for`, `bootstrap_form_with`, `fields_for`, or any field helpers inside of it:\n\n| Option | Description | Default value |\n| ------ | ------------- | ----------- |\n| `disabled` | An option to disable **rails_bootstrap_form** helpers. Default rails form builder element is rendered when set to `true` | `false` |\n| `layout` | Controls layout of form and field helpers. It can be `vertical` `horizontal`, or `inline`. | `vertical` |\n| `field_class` | A CSS class that will be applied to all form fields. | `nil` |\n| `help_text` | Describes help text for the HTML field. Help text is automatically read from translation file. If you want to customize it, you can pass a string. You can also set it `false` if you do not want help text displayed. | `nil` |\n| `label_text` | An option to customize automatically generated label text. | `nil` |\n| `skip_label` | An option to control whether the label is to be displayed or not. | `false` |\n| `hide_label` | An option to control whether the label is only accessible to a screen readers. | `false` |\n| `hide_class` | A CSS class that will be used when the label is only accessible to a screen readers. | `visually-hidden` |\n| `label_class` | A CSS class that will be applied to all labels when layout is `vertical`. | `form-label` |\n| `additional_label_class` | An additional CSS class that will be added along with the existing label css classes. | `nil` |\n| `prepend` | Raw or HTML content to be prepended to the field. | `nil` |\n| `append` | Raw or HTML content to be appended to the field. | `nil` |\n| `additional_input_group_class` | An additional CSS class that will be added to existing input group wrapper css classes. | `nil` |\n| `floating` | An option to control whether the field should have a floating label. | `false` |\n| `static_field_class` | A CSS class that will be applied to all static fields. | `form-control-plaintext` |\n| `switch` | An option to control whether the check box should look like Bootstrap switches. | `false` |\n| `wrapper` | An option to control the HTML attributes and options that will be added to a field wrapper. You can set it false if you don't the field to be rendered in a wrapper. | `{}` |\n| `size` | An option to control the size of input groups, buttons, labels, and fields. It can be `sm` or `lg`. | `nil` |\n| `inline` | An option to group checkboxes and radio buttons on the same horizontal row. If form layout is `inline`, this option doesn't get considered. | `false` |\n| `label_col_class` | A CSS class that will be applied to all labels when layout is `horizontal`. | `col-form-label` |\n| `label_col_wrapper_class` | A CSS class for label column when layout is `horizontal`. | `col-sm-2` |\n| `field_col_wrapper_class` | A CSS class for field column when layout is `horizontal`. | `col-sm-10` |\n| `render_as_button` | An option to render submit button using `\u003cbutton type=\"submit\"\u003e` instead of `\u003cinput type=\"submit\"\u003e`. | `false` |\n\nOptions defined on the form level will apply to all field helpers. Options defined on field helpers takes precedence over form-level options.\nHere's an example of a form where one field uses different layout:\n\n![bootstrap_option_override](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/9d312870-033f-4bc4-922b-1b65df202352)\n\n```erb\n\u003c%= bootstrap_form_for @user do |form| %\u003e\n  \u003c%= form.text_field :name %\u003e\n  \u003c%= form.email_field :email %\u003e\n  \u003c%= form.password_field :password, bootstrap: {layout: :horizontal} %\u003e\n  \u003c%= form.check_box :terms %\u003e\n  \u003c%= form.primary \"Register\" %\u003e\n\u003c% end %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cform novalidate=\"novalidate\" class=\"new_user\" id=\"new_user\" action=\"/users\" accept-charset=\"UTF-8\" method=\"post\"\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003clabel class=\"form-label required\" for=\"user_name\"\u003eName\u003c/label\u003e\n    \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"text\" name=\"user[name]\" id=\"user_name\"\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003clabel class=\"form-label required\" for=\"user_email\"\u003eEmail address\u003c/label\u003e\n    \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"email\" name=\"user[email]\" id=\"user_email\"\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"row mb-3\"\u003e\n    \u003clabel class=\"col-form-label col-sm-2 required\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n    \u003cdiv class=\"col-sm-10\"\u003e\n      \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003cdiv class=\"form-check\"\u003e\n      \u003cinput class=\"form-check-input\" type=\"checkbox\" value=\"1\" name=\"user[terms]\" id=\"user_terms\"\u003e\n      \u003clabel class=\"form-check-label\" for=\"user_terms\"\u003eI accept terms and conditions\u003c/label\u003e\n      \u003cdiv class=\"form-text text-muted\"\u003eYou must first accept terms and conditions in order to continue\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cinput type=\"submit\" name=\"commit\" value=\"Register\" class=\"btn btn-primary\" data-disable-with=\"Register\"\u003e\n\u003c/form\u003e\n```\n\n### Disabling Bootstrap\n\nYou can completely disable bootstrap and use default form builder by passing `disabled: true` option. For example:\n\n```erb\n\u003c%= form.text_field :username, bootstrap: {disabled: true} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cinput type=\"text\" name=\"user[username]\" id=\"user_username\"\u003e\n```\n\n### Disabling wrapper\n\nIn some cases, you may need to disable the default wrapper. You can do this by passing `wrapper: false` option:\n\n![wrapper_false](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/1693cf0f-7a30-494d-9fb5-394f4fb2c676)\n\n```erb\n\u003c%= form.text_field :name, bootstrap: {wrapper: false} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003clabel class=\"form-label required\" for=\"user_name\"\u003eName\u003c/label\u003e\n\u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"text\" name=\"user[name]\" id=\"user_name\"\u003e\n```\n\n### Add additional CSS class\n\nYou can use `additional_field_class` option at form or field level to add extra CSS classes to the fields.\n\n```erb\n\u003c%= form.text_field :name, autocomplete: \"new-name\", bootstrap: {additional_field_class: \"custom-class\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_name\"\u003eName\u003c/label\u003e\n  \u003cinput autocomplete=\"new-name\" class=\"form-control custom-class\" aria-required=\"true\" required=\"required\" type=\"text\" name=\"user[name]\" id=\"user_name\"\u003e\n\u003c/div\u003e\n```\n\nYou can also use HTML `class` attribute to add additional CSS class to the single field:\n\n```erb\n\u003c%= form.text_field :name, autocomplete: \"new-name\", class: \"custom-class\" %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_name\"\u003eName\u003c/label\u003e\n  \u003cinput autocomplete=\"new-name\" class=\"form-control custom-class\" aria-required=\"true\" required=\"required\" type=\"text\" name=\"user[name]\" id=\"user_name\"\u003e\n\u003c/div\u003e\n```\n\nHere `additional_field_class` option takes precedance over HTML `class` attribute:\n\n```erb\n\u003c%= form.text_field :name, autocomplete: \"new-name\", bootstrap: {additional_field_class: \"custom-class\"}, class: \"html-class\" %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_name\"\u003eName\u003c/label\u003e\n  \u003cinput autocomplete=\"new-name\" class=\"form-control custom-class\" aria-required=\"true\" required=\"required\" type=\"text\" name=\"user[name]\" id=\"user_name\"\u003e\n\u003c/div\u003e\n```\n\n## Supported Form Helpers\n\nThis gem wraps most of the form field helpers. Here's the current list:\n\n```\ncheck_box                    collection_check_boxes       collection_radio_buttons\ncollection_select            color_field                  date_field\ndate_select                  datetime_field               datetime_local_field\ndatetime_select              email_field                  file_field\ngrouped_collection_select    hidden_field                 month_field\nnumber_field                 password_field               phone_field\nradio_button                 range_field                  rich_text_area\nsearch_field                 select                       static_field\ntelephone_field              text_area                    text_field\ntime_field                   time_select                  time_zone_select\nurl_field                    week_field                   weekday_select\n```\n\n## Supported Form Layouts\n\n### Vertical Layout\n\nThis layout is default layout for the form in which labels are above the fields. In this layout, labels and fields take 100% of the width.\n\nHere's an example of how it looks like:\n\n![vertical_layout](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/0795cad6-f2f9-4cc6-bb39-aace67156781)\n\n```erb\n\u003c%= bootstrap_form_for @user do |form| %\u003e\n  \u003c%= form.email_field :email %\u003e\n  \u003c%= form.password_field :password %\u003e\n  \u003c%= form.primary \"Sign in\" %\u003e\n\u003c% end %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cform novalidate=\"novalidate\" class=\"new_user\" id=\"new_user\" action=\"/users\" accept-charset=\"UTF-8\" method=\"post\"\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003clabel class=\"form-label required\" for=\"user_email\"\u003eEmail address\u003c/label\u003e\n    \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"email\" name=\"user[email]\" id=\"user_email\"\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003clabel class=\"form-label required\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n    \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n  \u003c/div\u003e\n  \u003cinput type=\"submit\" name=\"commit\" value=\"Sign in\" class=\"btn btn-primary\" data-disable-with=\"Sign in\"\u003e\n\u003c/form\u003e\n```\n\n### Horizontal Layout\n\nIf you want to align label and field side by side, you can use horizontal layout for the form.\nYou can optionally override `label_col_wrapper_class` and `field_col_wrapper_class` (they default to `col-sm-2` and `col-sm-10`) at either form level\nor field level if want to customize space between label and field.\n\nHere's an example of how it looks like by default:\n\n![horizontal_layout](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/71493945-31d5-4917-83c2-8cb7b0825371)\n\n```erb\n\u003c%= bootstrap_form_for @user, bootstrap: {layout: :horizontal} do |form| %\u003e\n  \u003c%= form.email_field :email %\u003e\n  \u003c%= form.password_field :password %\u003e\n  \u003c%= form.primary \"Sign in\" %\u003e\n\u003c% end %\u003e\n```\nThis generates the following HTML:\n\n```html\n\u003cform novalidate=\"novalidate\" class=\"new_user\" id=\"new_user\" action=\"/users\" accept-charset=\"UTF-8\" method=\"post\"\u003e\n  \u003cdiv class=\"row mb-3\"\u003e\n    \u003clabel class=\"col-form-label col-sm-2 required\" for=\"user_email\"\u003eEmail address\u003c/label\u003e\n    \u003cdiv class=\"col-sm-10\"\u003e\n      \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"email\" name=\"user[email]\" id=\"user_email\"\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"row mb-3\"\u003e\n    \u003clabel class=\"col-form-label col-sm-2 required\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n    \u003cdiv class=\"col-sm-10\"\u003e\n      \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cinput type=\"submit\" name=\"commit\" value=\"Sign in\" class=\"btn btn-primary\" data-disable-with=\"Sign in\"\u003e\n\u003c/form\u003e\n```\n\nThe `label_col_wrapper_class` and `field_col_wrapper_class` css classes can also be customized per control:\n\n![horizontal_form_custom_classes](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/ae5492f0-4a10-4f63-ae4d-9675bfb93226)\n\n```erb\n\u003c%= bootstrap_form_for @user, bootstrap: {layout: :horizontal} do |form| %\u003e\n  \u003c%= form.text_field :name %\u003e\n  \u003c%= form.email_field :username, bootstrap: {label_col_wrapper_class: \"col-sm-2\", field_col_wrapper_class: \"col-sm-6\"} %\u003e\n  \u003c%= form.password_field :password %\u003e\n  \u003c%= form.fields_for :address, include_id: false do |address_form| %\u003e\n    \u003c%= address_form.select :country_id, options_for_select(::Country.pluck(:name, :id), address_form.object.country_id),\n        {include_blank: \"Select Country\"} %\u003e\n  \u003c% end %\u003e\n  \u003c%= form.primary \"Register\" %\u003e\n\u003c% end %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cform novalidate=\"novalidate\" class=\"new_user\" id=\"new_user\" action=\"/users\" accept-charset=\"UTF-8\" method=\"post\"\u003e\n  \u003cdiv class=\"row mb-3\"\u003e\n    \u003clabel class=\"col-form-label col-sm-2 required\" for=\"user_name\"\u003eName\u003c/label\u003e\n    \u003cdiv class=\"col-sm-10\"\u003e\n      \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"text\" name=\"user[name]\" id=\"user_name\"\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"row mb-3\"\u003e\n    \u003clabel class=\"col-form-label col-sm-2\" for=\"user_username\"\u003eUsername\u003c/label\u003e\n    \u003cdiv class=\"col-sm-6\"\u003e\n      \u003cinput class=\"form-control\" type=\"email\" name=\"user[username]\" id=\"user_username\"\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"row mb-3\"\u003e\n    \u003clabel class=\"col-form-label col-sm-2 required\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n    \u003cdiv class=\"col-sm-10\"\u003e\n      \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"row mb-3\"\u003e\n    \u003clabel class=\"col-form-label col-sm-2 required\" for=\"user_address_attributes_country_id\"\u003eCountry\u003c/label\u003e\n    \u003cdiv class=\"col-sm-10\"\u003e\n      \u003cselect class=\"form-select\" aria-required=\"true\" required=\"required\" name=\"user[address_attributes][country_id]\" id=\"user_address_attributes_country_id\"\u003e\n        \u003coption value=\"\"\u003eSelect Country\u003c/option\u003e\n        \u003coption value=\"1\"\u003eIndia\u003c/option\u003e\n        \u003coption value=\"2\"\u003eIreland\u003c/option\u003e\n        \u003coption value=\"3\"\u003eUnited States\u003c/option\u003e\n        \u003coption value=\"4\"\u003eUnited Kingdom\u003c/option\u003e\n      \u003c/select\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cinput type=\"submit\" name=\"commit\" value=\"Register\" class=\"btn btn-primary\" data-disable-with=\"Register\"\u003e\n\u003c/form\u003e\n```\n\n### Inline Layout\n\nYou may choose to render form elements in one line. Please note that this layout won't render all form elements perfectly. Things like errors messages and help text won't show up right.\n\nHere's an example of how it looks like:\n\n![inline_layout](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/644a08ec-b249-4e1c-8d61-5350e6649f11)\n\n```erb\n\u003c%= bootstrap_form_for @user, bootstrap: {layout: :inline} do |form| %\u003e\n  \u003c%= form.email_field :email %\u003e\n  \u003c%= form.password_field :password %\u003e\n  \u003c%= form.primary \"Sign in\" %\u003e\n\u003c% end %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cform novalidate=\"novalidate\" class=\"new_user row row-cols-lg-auto g-3 align-items-center\" id=\"new_user\" action=\"/users\" accept-charset=\"UTF-8\" method=\"post\"\u003e\n  \u003cdiv class=\"col-12\"\u003e\n    \u003clabel class=\"form-label visually-hidden required\" for=\"user_email\"\u003eEmail address\u003c/label\u003e\n    \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" placeholder=\"Email address\" type=\"email\" name=\"user[email]\" id=\"user_email\"\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"col-12\"\u003e\n    \u003clabel class=\"form-label visually-hidden required\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n    \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" placeholder=\"Password\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"col-12\"\u003e\n    \u003cinput type=\"submit\" name=\"commit\" value=\"Sign in\" class=\"btn btn-primary\" data-disable-with=\"Sign in\"\u003e\n  \u003c/div\u003e\n\u003c/form\u003e\n```\n\n## Components\n\n`rails_bootstrap_form` internally supports below components which act as helpers to build fields and their wrappers.\n\n### Labels\n\nBy default, Rails takes label text from locale file. You can use `label_text` option to change label text\ngenerated by the Rails.\n\n![label_text](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/b6378a06-c8e0-4944-8e0c-940a25964062)\n\n```erb\n\u003c%= form.password_field :password, bootstrap: {label_text: \"New password\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_password\"\u003eNew password\u003c/label\u003e\n  \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n\u003c/div\u003e\n```\n\nTo hide a label, you can set `hide_label: true` option. This adds the `visually-hidden` class, which keeps your labels accessible\nto those using screen readers.\n\n![hide_label](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/512a16b9-6829-40a2-bf07-f087970c9dac)\n\n```erb\n\u003c%= form.password_field :password, bootstrap: {hide_label: true} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label visually-hidden required\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n  \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n\u003c/div\u003e\n```\n\nTo skip a label, you can set `skip_label: true` option. This will not render label in a field wrapper.\n\n![skip_label](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/251e28ac-b98b-4e6a-8d55-8c0cb061e65a)\n\n```erb\n\u003c%= form.password_field :password, bootstrap: {skip_label: true} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n\u003c/div\u003e\n```\n\nTo add additional CSS class to the label, you can use `additional_label_class` option.\n\n![additional_label_class](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/b5ab4efe-2512-4ee4-9d35-99d3b7f78171)\n\n```erb\n\u003c%= form.password_field :password, bootstrap: {additional_label_class: \"text-danger\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label text-danger required\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n  \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n\u003c/div\u003e\n```\n\n### Help Text\n\nThe help text is useful when you want to provide helpful information about a field. By default, `rails_bootstrap_form` takes help text from locale file.\nIf you want to show information regarding any field, you need to add it in locale file of your application. You can also use HTML content for help text.\n\n```yml\nen:\n  activerecord:\n    help_texts:\n      user:\n        password: \"A strong password should be at least twelve characters long with combination of uppercase letters, lowercase letters, numbers, and symbols\"\n```\n\n![help_text_from_translation](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/e6d94d8c-9b47-4940-b2e0-6f1efef5a720)\n\n```erb\n\u003c%= form.password_field :password %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n  \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n  \u003cdiv class=\"form-text text-muted\"\u003eA strong password should be at least twelve characters long with combination of uppercase letters, lowercase letters, numbers, and symbols\u003c/div\u003e\n\u003c/div\u003e\n```\n\nYou can customize the help text using `help_text` option:\n\n![help_text](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/cdfe0e3c-6fcd-45a4-9621-9f0341925a1c)\n\n```erb\n\u003c%= form.password_field :password, bootstrap: {help_text: \"Password should not be disclosed to anyone.\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n  \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n  \u003cdiv class=\"form-text text-muted\"\u003ePassword should not be disclosed to anyone.\u003c/div\u003e\n\u003c/div\u003e\n```\n\nYou can also disable help text by setting `help_text: false` option:\n\n![help_text_false](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/be1a229a-cffd-447d-b846-9b9588b1b25e)\n\n```erb\n\u003c%= form.password_field :password, help_text: false %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n  \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n\u003c/div\u003e\n```\n\n### Input Groups\n\nInput groups allow prepending and appending arbitrary html or text to the field.\n\nYou can use `prepend` and/or `append` options to attach addons to input fields:\n\n![input_group_addon](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/e7fb8f52-558d-458d-a112-2ee3bab366db)\n\n```erb\n\u003c%= form.number_field :expected_ctc, bootstrap: {prepend: \"₹\", append: \".00\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_expected_ctc\"\u003eExpected CTC\u003c/label\u003e\n  \u003cdiv class=\"input-group\"\u003e\n    \u003cspan class=\"input-group-text\"\u003e₹\u003c/span\u003e\n    \u003cinput class=\"form-control\" type=\"number\" name=\"user[expected_ctc]\" id=\"user_expected_ctc\"\u003e\n    \u003cspan class=\"input-group-text\"\u003e.00\u003c/span\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\nIf you want to attach multiple addons to the input, pass them as an array:\n\n![input_group_multiple_addons](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/8a6179c2-0def-428a-8429-c97db2c4a567)\n\n```erb\n\u003c%= form.number_field :expected_ctc, bootstrap: {prepend: [\"Gross\", \"₹\"], append: [\".00\", \"per annum\"]} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_expected_ctc\"\u003eExpected CTC\u003c/label\u003e\n  \u003cdiv class=\"input-group\"\u003e\n    \u003cspan class=\"input-group-text\"\u003eGross\u003c/span\u003e\n    \u003cspan class=\"input-group-text\"\u003e₹\u003c/span\u003e\n    \u003cinput class=\"form-control\" type=\"number\" name=\"user[expected_ctc]\" id=\"user_expected_ctc\"\u003e\n    \u003cspan class=\"input-group-text\"\u003e.00\u003c/span\u003e\n    \u003cspan class=\"input-group-text\"\u003eper annum\u003c/span\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\nYou can also prepend and append buttons. Note that these buttons must contain the `btn` class to generate the correct markup.\n\n![input_group_button](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/f0d1e22a-ca2b-42da-b99c-f3e7003d8c27)\n\n```erb\n\u003c%= form.text_field :search, bootstrap: {append: form.secondary(\"Search\")} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_search\"\u003eSearch\u003c/label\u003e\n  \u003cdiv class=\"input-group\"\u003e\n    \u003cinput class=\"form-control\" type=\"text\" name=\"user[search]\" id=\"user_search\"\u003e\n    \u003cinput type=\"submit\" name=\"commit\" value=\"Search\" class=\"btn btn-secondary\" data-disable-with=\"Search\"\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\nTo add additional CSS class to the input group wrapper, you can use `additional_input_group_class` option.\n\n![additional_input_group_class](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/1814ec85-1efe-4ffc-ba87-c171d1b73e2c)\n\n```erb\n\u003c%= form.number_field :expected_ctc, bootstrap: {prepend: \"₹\", append: \".00\", additional_input_group_class: \"custom-class\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_expected_ctc\"\u003eExpected CTC\u003c/label\u003e\n  \u003cdiv class=\"input-group custom-class\"\u003e\n    \u003cspan class=\"input-group-text\"\u003e₹\u003c/span\u003e\n    \u003cinput class=\"form-control\" type=\"number\" name=\"user[expected_ctc]\" id=\"user_expected_ctc\"\u003e\n    \u003cspan class=\"input-group-text\"\u003e.00\u003c/span\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\nYou can customize size of the input group using `size` option. Input group supports `sm` and `lg` values.\n\n![input_group_size](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/b7236bd6-4dad-4142-b14e-f6325a612958)\n\n```erb\n\u003c%= form.number_field :expected_ctc, bootstrap: {prepend: \"₹\", append: \".00\", size: :sm} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_expected_ctc\"\u003eExpected CTC\u003c/label\u003e\n  \u003cdiv class=\"input-group input-group-sm\"\u003e\n    \u003cspan class=\"input-group-text\"\u003e₹\u003c/span\u003e\n    \u003cinput class=\"form-control form-control-sm\" type=\"number\" name=\"user[expected_ctc]\" id=\"user_expected_ctc\"\u003e\n    \u003cspan class=\"input-group-text\"\u003e.00\u003c/span\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n## Form Helpers\n\nOur form helpers accept the same arguments as the default Rails form helpers.\nIn order to apply addition options of `rails_bootstrap_form`, `bootstrap` object is passed in `options` argument of the helper.\nHere's an example of how you pass the arguments for each form helper:\n\n### check_box\n\nOur `check_box` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-check_box).\nexcept it don't accept a `block` as an argument and renders check box and label for you.\n\n![check_box](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/5836650c-d536-4f4e-b768-75bca9dd7901)\n\n```erb\n\u003c%= form.check_box :remember_me %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003cdiv class=\"form-check\"\u003e\n    \u003cinput class=\"form-check-input\" type=\"checkbox\" value=\"1\" name=\"user[remember_me]\" id=\"user_remember_me\"\u003e\n    \u003clabel class=\"form-check-label\" for=\"user_remember_me\"\u003eKeep me signed in\u003c/label\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\nYou can set `switch: true` option if you want check box to look like switches.\n\n![check_box_switch](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/20c493ce-7f2c-4ac9-a854-e1520cae6a54)\n\n```erb\n\u003c%= form.check_box :remember_me, bootstrap: {switch: true} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003cdiv class=\"form-check form-switch\"\u003e\n    \u003cinput class=\"form-check-input\" type=\"checkbox\" value=\"1\" name=\"user[remember_me]\" id=\"user_remember_me\"\u003e\n    \u003clabel class=\"form-check-label\" for=\"user_remember_me\"\u003eKeep me signed in\u003c/label\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\nThis helper also renders help text if `help_text` option is set or information of the field is added to the locale file:\n\n![check_box_help_text](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/071a6ac3-112c-42d0-965f-cd7751fdff19)\n\n```erb\n\u003c%= form.check_box :terms, required: true %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003cdiv class=\"form-check\"\u003e\n    \u003cinput required=\"required\" class=\"form-check-input\" type=\"checkbox\" value=\"1\" name=\"user[terms]\" id=\"user_terms\"\u003e\n    \u003clabel class=\"form-check-label required\" for=\"user_terms\"\u003eI accept terms and conditions\u003c/label\u003e\n    \u003cdiv class=\"form-text text-muted\"\u003eYou must first accept terms and conditions in order to continue\u003c/div\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n### color_field\n\nOur `color_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-color_field).\n\n![color_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/d83f8231-076f-48cc-b27c-4076d6be8ab6)\n\n```erb\n\u003c%= form.color_field :favorite_color %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_favorite_color\"\u003eFavorite color\u003c/label\u003e\n  \u003cinput class=\"form-control form-control-color\" aria-required=\"true\" required=\"required\" value=\"#000000\" type=\"color\" name=\"user[favorite_color]\" id=\"user_favorite_color\"\u003e\n\u003c/div\u003e\n```\n\n### date_field\n\nOur `date_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-date_field).\n\n![date_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/ddab2730-4076-4d0d-91c8-08b1f231741b)\n\n```erb\n\u003c%= form.date_field :interview_date %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_interview_date\"\u003eInterview date\u003c/label\u003e\n  \u003cinput class=\"form-control\" value=\"2023-05-08\" type=\"date\" name=\"user[interview_date]\" id=\"user_interview_date\"\u003e\n\u003c/div\u003e\n```\n\n### datetime_field\n\nOur `datetime_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-datetime_field).\n\n![datetime_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/3b311f50-927f-4aa6-974a-2f5d0d79ff4f)\n\n```erb\n\u003c%= form.datetime_field :interview_datetime %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_interview_datetime\"\u003eInterview date \u0026amp; time\u003c/label\u003e\n  \u003cinput class=\"form-control\" type=\"datetime-local\" name=\"user[interview_datetime]\" id=\"user_interview_datetime\"\u003e\n\u003c/div\u003e\n```\n\n### datetime_local_field\n\nOur `datetime_local_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-datetime_local_field).\n\n![datetime_local_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/ec9241a4-aa6e-448f-8478-04dba1cb7c11)\n\n```erb\n\u003c%= form.datetime_local_field :interview_datetime %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_interview_datetime\"\u003eInterview date \u0026amp; time\u003c/label\u003e\n  \u003cinput class=\"form-control\" type=\"datetime-local\" name=\"user[interview_datetime]\" id=\"user_interview_datetime\"\u003e\n\u003c/div\u003e\n```\n\n### email_field\n\nOur `email_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-email_field).\n\n![email_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/a9b61ca1-7eb9-47e4-9bb0-db9f964186e7)\n\n```erb\n\u003c%= form.email_field :email %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_email\"\u003eEmail address\u003c/label\u003e\n  \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"email\" name=\"user[email]\" id=\"user_email\"\u003e\n\u003c/div\u003e\n```\n\n### fields_for\n\nOur `fields_for` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-fields_for).\n\n`rails_bootstrap_form` allows us to set `bootstrap` option just like `bootstrap_form_for` and `bootstrap_form_with`. By setting this option on `fields_for`, it applies to all the fields defined for that nested form:\n\n![fields_for](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/f515302f-a92a-4b5c-a444-af91cbb00dff)\n\n```erb\n\u003c%= bootstrap_form_for @user do |form| %\u003e\n  \u003c%= form.email_field :email, autocomplete: \"new-email\" %\u003e\n  \u003c%= form.password_field :password, autocomplete: \"new-password\", bootstrap: {layout: :horizontal} %\u003e\n  \u003c%= form.phone_field :mobile_number %\u003e\n  \u003c%= form.fields_for :address, include_id: false, bootstrap: {layout: :horizontal} do |address_form| %\u003e\n    \u003c%= address_form.select :country_id, options_for_select(::Country.pluck(:name, :id), address_form.object.country_id),\n        {include_blank: \"Select Country\"} %\u003e\n  \u003c% end %\u003e\n  \u003c%= form.check_box :terms, required: true %\u003e\n  \u003c%= form.primary \"Register\" %\u003e\n\u003c% end %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cform novalidate=\"novalidate\" class=\"new_user\" id=\"new_user\" action=\"/users\" accept-charset=\"UTF-8\" method=\"post\"\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003clabel class=\"form-label required\" for=\"user_email\"\u003eEmail address\u003c/label\u003e\n    \u003cinput autocomplete=\"new-email\" class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"email\" name=\"user[email]\" id=\"user_email\"\u003e\n    \u003cdiv class=\"form-text text-muted\"\u003ePlease use official email address\u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"row mb-3\"\u003e\n    \u003clabel class=\"col-form-label col-sm-2 required\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n    \u003cdiv class=\"col-sm-10\"\u003e\n      \u003cinput autocomplete=\"new-password\" class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003clabel class=\"form-label required\" for=\"user_mobile_number\"\u003eMobile number\u003c/label\u003e\n    \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"tel\" name=\"user[mobile_number]\" id=\"user_mobile_number\"\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"row mb-3\"\u003e\n    \u003clabel class=\"col-form-label col-sm-2 required\" for=\"user_address_attributes_country_id\"\u003eCountry\u003c/label\u003e\n    \u003cdiv class=\"col-sm-10\"\u003e\n      \u003cselect class=\"form-select\" aria-required=\"true\" required=\"required\" name=\"user[address_attributes][country_id]\" id=\"user_address_attributes_country_id\"\u003e\n        \u003coption value=\"\"\u003eSelect Country\u003c/option\u003e\n        \u003coption value=\"1\"\u003eIndia\u003c/option\u003e\n        \u003coption value=\"2\"\u003eIreland\u003c/option\u003e\n        \u003coption value=\"3\"\u003eUnited States\u003c/option\u003e\n        \u003coption value=\"4\"\u003eUnited Kingdom\u003c/option\u003e\n        \u003coption value=\"5\"\u003eSpain\u003c/option\u003e\n        \u003coption value=\"6\"\u003eFrance\u003c/option\u003e\n        \u003coption value=\"7\"\u003eCanada\u003c/option\u003e\n      \u003c/select\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003cdiv class=\"form-check\"\u003e\n      \u003cinput required=\"required\" class=\"form-check-input\" type=\"checkbox\" value=\"1\" name=\"user[terms]\" id=\"user_terms\"\u003e\n      \u003clabel class=\"form-check-label required\" for=\"user_terms\"\u003eI accept terms and conditions\u003c/label\u003e\n      \u003cdiv class=\"form-text text-muted\"\u003eYou must first accept terms and conditions in order to continue\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cinput type=\"submit\" name=\"commit\" value=\"Register\" class=\"btn btn-primary\" data-disable-with=\"Register\"\u003e\n\u003c/form\u003e\n```\n\nBy setting `bootstrap` option on `bootstrap_form_for` or `bootstrap_form_with`, this option also applies to all the fields defined in fields_for block:\n\n![fields_for_horizontal](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/cb75e76b-e8a3-48f1-83a1-9eb150aa2466)\n\n```erb\n\u003c%= bootstrap_form_for @user, bootstrap: {layout: :horizontal} do |form| %\u003e\n  \u003c%= form.email_field :email, autocomplete: \"new-email\" %\u003e\n  \u003c%= form.password_field :password, autocomplete: \"new-password\" %\u003e\n  \u003c%= form.phone_field :mobile_number %\u003e\n  \u003c%= form.fields_for :address, include_id: false do |address_form| %\u003e\n    \u003c%= address_form.select :country_id, options_for_select(::Country.pluck(:name, :id), address_form.object.country_id),\n        {include_blank: \"Select Country\"} %\u003e\n  \u003c% end %\u003e\n  \u003c%= form.check_box :terms, required: true %\u003e\n  \u003c%= form.primary \"Register\" %\u003e\n\u003c% end %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cform novalidate=\"novalidate\" class=\"new_user\" id=\"new_user\" action=\"/users\" accept-charset=\"UTF-8\" method=\"post\"\u003e\n  \u003cdiv class=\"row mb-3\"\u003e\n    \u003clabel class=\"col-form-label col-sm-2 required\" for=\"user_email\"\u003eEmail address\u003c/label\u003e\n    \u003cdiv class=\"col-sm-10\"\u003e\n      \u003cinput autocomplete=\"new-email\" class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"email\" name=\"user[email]\" id=\"user_email\"\u003e\n      \u003cdiv class=\"form-text text-muted\"\u003ePlease use official email address\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"row mb-3\"\u003e\n    \u003clabel class=\"col-form-label col-sm-2 required\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n    \u003cdiv class=\"col-sm-10\"\u003e\n      \u003cinput autocomplete=\"new-password\" class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"row mb-3\"\u003e\n    \u003clabel class=\"col-form-label col-sm-2 required\" for=\"user_mobile_number\"\u003eMobile number\u003c/label\u003e\n    \u003cdiv class=\"col-sm-10\"\u003e\n      \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"tel\" name=\"user[mobile_number]\" id=\"user_mobile_number\"\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"row mb-3\"\u003e\n    \u003clabel class=\"col-form-label col-sm-2 required\" for=\"user_address_attributes_country_id\"\u003eCountry\u003c/label\u003e\n    \u003cdiv class=\"col-sm-10\"\u003e\n      \u003cselect class=\"form-select\" aria-required=\"true\" required=\"required\" name=\"user[address_attributes][country_id]\" id=\"user_address_attributes_country_id\"\u003e\n        \u003coption value=\"\"\u003eSelect Country\u003c/option\u003e\n        \u003coption value=\"1\"\u003eIndia\u003c/option\u003e\n        \u003coption value=\"2\"\u003eIreland\u003c/option\u003e\n        \u003coption value=\"3\"\u003eUnited States\u003c/option\u003e\n        \u003coption value=\"4\"\u003eUnited Kingdom\u003c/option\u003e\n        \u003coption value=\"5\"\u003eSpain\u003c/option\u003e\n        \u003coption value=\"6\"\u003eFrance\u003c/option\u003e\n        \u003coption value=\"7\"\u003eCanada\u003c/option\u003e\n      \u003c/select\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"row mb-3\"\u003e\n    \u003cdiv class=\"col-sm-10 offset-sm-2\"\u003e\n      \u003cdiv class=\"form-check\"\u003e\n        \u003cinput name=\"user[terms]\" type=\"hidden\" value=\"0\" autocomplete=\"off\"\u003e\n        \u003cinput required=\"required\" class=\"form-check-input\" type=\"checkbox\" value=\"1\" name=\"user[terms]\" id=\"user_terms\"\u003e\n        \u003clabel class=\"form-check-label required\" for=\"user_terms\"\u003eI accept terms and conditions\u003c/label\u003e\n        \u003cdiv class=\"form-text text-muted\"\u003eYou must first accept terms and conditions in order to continue\u003c/div\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cinput type=\"submit\" name=\"commit\" value=\"Register\" class=\"btn btn-primary\" data-disable-with=\"Register\"\u003e\n\u003c/form\u003e\n```\n\nOptions specified at the field level take precedence over those specified at the fields_for level, which take precedence over those specified at the form level.\n\n### file_field\n\nOur `file_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-file_field).\n\n![file_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/d9d41696-b2aa-43f7-9698-d6c339b01de0)\n\n```erb\n\u003c%= form.file_field :avatar %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_avatar\"\u003eAvatar\u003c/label\u003e\n  \u003cinput class=\"form-control\" type=\"file\" name=\"user[avatar]\" id=\"user_avatar\"\u003e\n\u003c/div\u003e\n```\n\n### hidden_field\n\nThe `hidden_field` helper in `rails_bootstrap_form` calls the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-hidden_field) directly, and does no additional mark-up.\n\n### month_field\n\nOur `month_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-month_field).\n\n![month_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/39627509-fd90-425b-b4c5-b0a2afdb59ae)\n\n```erb\n\u003c%= form.month_field :birth_month %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_birth_month\"\u003eBirth month\u003c/label\u003e\n  \u003cinput class=\"form-control\" type=\"month\" name=\"user[birth_month]\" id=\"user_birth_month\"\u003e\n\u003c/div\u003e\n```\n\n### number_field\n\nOur `number_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-number_field).\n\n![number_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/c9018601-991d-4589-bcc1-1a8fb3dc9c18)\n\n```erb\n\u003c%= form.number_field :expected_ctc %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_expected_ctc\"\u003eExpected CTC\u003c/label\u003e\n  \u003cinput class=\"form-control\" type=\"number\" name=\"user[expected_ctc]\" id=\"user_expected_ctc\"\u003e\n\u003c/div\u003e\n```\n\n### password_field\n\nOur `password_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-password_field).\n\n![password_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/594696b4-a8b4-460d-a1ed-f27bc21bcbf0)\n\n```erb\n\u003c%= form.password_field :password %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n  \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n\u003c/div\u003e\n```\n\n### phone_field\n\nOur `phone_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-phone_field).\n\n![phone_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/44f2acec-2a01-4715-a26e-0ff98653fbaf)\n\n```erb\n\u003c%= form.phone_field :mobile_number %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_mobile_number\"\u003eMobile number\u003c/label\u003e\n  \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"tel\" name=\"user[mobile_number]\" id=\"user_mobile_number\"\u003e\n\u003c/div\u003e\n```\n\n### radio_button\n\nOur `radio_button` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-radio_button).\nThis helper will render check box and label for you.\n\n![radio_button](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/9afa4065-6eea-44a6-a5be-d2936d1d2f9c)\n\n```erb\n\u003c%= form.radio_button :gender, :male, bootstrap: {label_text: \"Male\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003cdiv class=\"form-check\"\u003e\n    \u003cinput class=\"form-check-input\" type=\"radio\" value=\"male\" name=\"user[gender]\" id=\"user_gender_male\"\u003e\n    \u003clabel class=\"form-check-label\" for=\"user_gender_male\"\u003eMale\u003c/label\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\nThis helper also renders help text if `help_text` option is set or information of the field is added to the locale file:\n\n![radio_button_help_text](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/2409e822-c1bd-499b-b80f-e2948acf3403)\n\n```erb\n\u003c%= form.radio_button :gender, :male, bootstrap: {label_text: \"Male\", help_text: \"Please select your gender\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003cdiv class=\"form-check\"\u003e\n    \u003cinput class=\"form-check-input\" type=\"radio\" value=\"male\" name=\"user[gender]\" id=\"user_gender_male\"\u003e\n    \u003clabel class=\"form-check-label\" for=\"user_gender_male\"\u003eMale\u003c/label\u003e\n    \u003cdiv class=\"form-text text-muted\"\u003ePlease select your gender\u003c/div\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n### range_field\n\nOur `range_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-range_field).\n\n![range_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/7173d6fe-9b6f-4d80-8a48-37e86e025661)\n\n```erb\n\u003c%= form.range_field :excellence %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_excellence\"\u003eExcellence\u003c/label\u003e\n  \u003cinput class=\"form-range\" type=\"range\" name=\"user[excellence]\" id=\"user_excellence\"\u003e\n\u003c/div\u003e\n```\n\n### rich_text_area\n\nOur `rich_text_area` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-rich_text_area). This editor is also known as `Trix Editor`.\n\n![rich_text_area](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/e845ee05-79f2-4352-899e-f93decc9b16b)\n\n```erb\n\u003c%= form.rich_text_area :life_story %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_life_story\"\u003eLife story\u003c/label\u003e\n  \u003cinput type=\"hidden\" name=\"user[life_story]\" id=\"user_life_story_trix_input_user\" autocomplete=\"off\"\u003e\n  \u003ctrix-toolbar id=\"trix-toolbar-1\"\u003e\n    \u003cdiv class=\"trix-button-row\"\u003e\n      \u003cspan class=\"trix-button-group trix-button-group--text-tools\" data-trix-button-group=\"text-tools\"\u003e\n        \u003cbutton type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-bold\" data-trix-attribute=\"bold\" data-trix-key=\"b\" title=\"Bold\" tabindex=\"-1\"\u003eBold\u003c/button\u003e\n        \u003cbutton type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-italic\" data-trix-attribute=\"italic\" data-trix-key=\"i\" title=\"Italic\" tabindex=\"-1\"\u003eItalic\u003c/button\u003e\n        \u003cbutton type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-strike\" data-trix-attribute=\"strike\" title=\"Strikethrough\" tabindex=\"-1\"\u003eStrikethrough\u003c/button\u003e\n        \u003cbutton type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-link\" data-trix-attribute=\"href\" data-trix-action=\"link\" data-trix-key=\"k\" title=\"Link\" tabindex=\"-1\"\u003eLink\u003c/button\u003e\n      \u003c/span\u003e\n      \u003cspan class=\"trix-button-group trix-button-group--block-tools\" data-trix-button-group=\"block-tools\"\u003e\n        \u003cbutton type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-heading-1\" data-trix-attribute=\"heading1\" title=\"Heading\" tabindex=\"-1\"\u003eHeading\u003c/button\u003e\n        \u003cbutton type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-quote\" data-trix-attribute=\"quote\" title=\"Quote\" tabindex=\"-1\"\u003eQuote\u003c/button\u003e\n        \u003cbutton type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-code\" data-trix-attribute=\"code\" title=\"Code\" tabindex=\"-1\"\u003eCode\u003c/button\u003e\n        \u003cbutton type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-bullet-list\" data-trix-attribute=\"bullet\" title=\"Bullets\" tabindex=\"-1\"\u003eBullets\u003c/button\u003e\n        \u003cbutton type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-number-list\" data-trix-attribute=\"number\" title=\"Numbers\" tabindex=\"-1\"\u003eNumbers\u003c/button\u003e\n        \u003cbutton type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-decrease-nesting-level\" data-trix-action=\"decreaseNestingLevel\" title=\"Decrease Level\" tabindex=\"-1\"\u003eDecrease Level\u003c/button\u003e\n        \u003cbutton type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-increase-nesting-level\" data-trix-action=\"increaseNestingLevel\" title=\"Increase Level\" tabindex=\"-1\"\u003eIncrease Level\u003c/button\u003e\n      \u003c/span\u003e\n      \u003cspan class=\"trix-button-group trix-button-group--file-tools\" data-trix-button-group=\"file-tools\"\u003e\n        \u003cbutton type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-attach\" data-trix-action=\"attachFiles\" title=\"Attach Files\" tabindex=\"-1\"\u003eAttach Files\u003c/button\u003e\n      \u003c/span\u003e\n      \u003cspan class=\"trix-button-group-spacer\"\u003e\u003c/span\u003e\n      \u003cspan class=\"trix-button-group trix-button-group--history-tools\" data-trix-button-group=\"history-tools\"\u003e\n        \u003cbutton type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-undo\" data-trix-action=\"undo\" data-trix-key=\"z\" title=\"Undo\" tabindex=\"-1\"\u003eUndo\u003c/button\u003e\n        \u003cbutton type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-redo\" data-trix-action=\"redo\" data-trix-key=\"shift+z\" title=\"Redo\" tabindex=\"-1\"\u003eRedo\u003c/button\u003e\n      \u003c/span\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"trix-dialogs\" data-trix-dialogs=\"\"\u003e\n      \u003cdiv class=\"trix-dialog trix-dialog--link\" data-trix-dialog=\"href\" data-trix-dialog-attribute=\"href\"\u003e\n        \u003cdiv class=\"trix-dialog__link-fields\"\u003e\n          \u003cinput type=\"url\" name=\"href\" class=\"trix-input trix-input--dialog\" placeholder=\"Enter a URL…\" aria-label=\"URL\" required=\"\" data-trix-input=\"\" disabled=\"disabled\"\u003e\n          \u003cdiv class=\"trix-button-group\"\u003e\n            \u003cinput type=\"button\" class=\"trix-button trix-button--dialog\" value=\"Link\" data-trix-method=\"setAttribute\"\u003e\n            \u003cinput type=\"button\" class=\"trix-button trix-button--dialog\" value=\"Unlink\" data-trix-method=\"removeAttribute\"\u003e\n          \u003c/div\u003e\n        \u003c/div\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/trix-toolbar\u003e\n  \u003ctrix-editor class=\"trix-content form-control\" id=\"user_life_story\" input=\"user_life_story_trix_input_user\" data-direct-upload-url=\"http://test.host/rails/active_storage/direct_uploads\" data-blob-url-template=\"http://test.host/rails/active_storage/blobs/redirect/:signed_id/:filename\" contenteditable=\"\" role=\"textbox\" aria-label=\"Life story Life story\" trix-id=\"1\" toolbar=\"trix-toolbar-1\"\u003e\u003c/trix-editor\u003e\n\u003c/div\u003e\n```\n\n### search_field\n\nOur `search_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-search_field).\n\n![search_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/b108c5d6-42b3-4fde-9717-dbb1cb8b8780)\n\n```erb\n\u003c%= form.search_field :search %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_search\"\u003eSearch\u003c/label\u003e\n  \u003cinput class=\"form-control\" type=\"search\" name=\"user[search]\" id=\"user_search\"\u003e\n\u003c/div\u003e\n```\n\n### telephone_field\n\nOur `telephone_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-telephone_field).\n\n![telephone_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/0f8ded9b-4dc5-4dea-9d3e-c8850776a0d4)\n\n```erb\n\u003c%= form.telephone_field :mobile_number %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_mobile_number\"\u003eMobile number\u003c/label\u003e\n  \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"tel\" name=\"user[mobile_number]\" id=\"user_mobile_number\"\u003e\n\u003c/div\u003e\n```\n\n### text_field\n\nOur `text_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-text_field).\n\n![text_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/88bc6eb0-53a6-4f5a-8dce-8499e6b2259d)\n\n```erb\n\u003c%= form.text_field :name %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_name\"\u003eName\u003c/label\u003e\n  \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" type=\"text\" name=\"user[name]\" id=\"user_name\"\u003e\n\u003c/div\u003e\n```\n\n### text_area\n\nOur `text_area` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-text_area).\n\n![text_area](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/3dad9907-4cd1-4144-a596-2471cce3739b)\n\n```erb\n\u003c%= form.text_area :street %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_street\"\u003eStreet\u003c/label\u003e\n  \u003ctextarea class=\"form-control\" aria-required=\"true\" required=\"required\" name=\"user[street]\" id=\"user_street\"\u003e\u003c/textarea\u003e\n\u003c/div\u003e\n```\n\n### time_field\n\nOur `time_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-time_field).\n\n![time_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/cbf1a798-acc5-49a9-94d3-f3462f15ebc9)\n\n```erb\n\u003c%= form.time_field :interview_time %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_interview_time\"\u003eInterview time\u003c/label\u003e\n  \u003cinput class=\"form-control\" type=\"time\" name=\"user[interview_time]\" id=\"user_interview_time\"\u003e\n\u003c/div\u003e\n```\n\n### url_field\n\nOur `url_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-url_field).\n\n![url_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/dfb8a3ab-a1b2-4ce8-a10b-619b3fb1a268)\n\n```erb\n\u003c%= form.url_field :blog_url %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_blog_url\"\u003eBlog URL\u003c/label\u003e\n  \u003cinput class=\"form-control\" type=\"url\" name=\"user[blog_url]\" id=\"user_blog_url\"\u003e\n\u003c/div\u003e\n```\n\n### week_field\n\nOur `week_field` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-week_field).\n\n![week_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/609d0c59-c5ff-497c-8461-fc289ab06d6f)\n\n```erb\n\u003c%= form.week_field :winter_holiday_week %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_winter_holiday_week\"\u003eWinter holiday week\u003c/label\u003e\n  \u003cinput class=\"form-control\" type=\"week\" name=\"user[winter_holiday_week]\" id=\"user_winter_holiday_week\"\u003e\n\u003c/div\u003e\n```\n\n## Form Options Helpers\n\nOur form options helpers accept the same arguments as the default Rails form options helpers.\nIn order to apply addition options of `rails_bootstrap_form`, `bootstrap` object is passed in `options` argument of the helper.\nHere's an example of how you pass the arguments for each form option helper:\n\n### select\n\nOur `select` helper accepts the same arguments as the [default Rails helper](http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-select).\nHere's an example of how you pass both options and html_options hashes:\n\n![select](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/e21f092c-d439-4817-bba1-8ec0c21330c1)\n\n```erb\n\u003c%= form.select :fruit_id, options_for_select(::Fruit.pluck(:name, :id), form.object.fruit_id), {include_blank: \"Select fruit\", bootstrap: {size: :sm, help_text: false}}, {onchange: \"this.form.submit();\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_fruit_id\"\u003eFavorite fruit\u003c/label\u003e\n  \u003cselect onchange=\"this.form.submit();\" class=\"form-select\" aria-required=\"true\" required=\"required\" name=\"user[fruit_id]\" id=\"user_fruit_id\"\u003e\n    \u003coption value=\"\"\u003eSelect fruit\u003c/option\u003e\n    \u003coption value=\"1\"\u003eMango\u003c/option\u003e\n    \u003coption value=\"2\"\u003eApple\u003c/option\u003e\n    \u003coption value=\"3\"\u003eOrange\u003c/option\u003e\n    \u003coption value=\"4\"\u003eWatermelon\u003c/option\u003e\n  \u003c/select\u003e\n\u003c/div\u003e\n```\n\n### collection_select\n\nOur `collection_select` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-collection_select).\nHere's an example of how you pass both options and html_options hashes:\n\n![collection_select](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/c3a24265-81a9-4d1b-aa01-2b066d2f8bc7)\n\n```erb\n\u003c%= form.collection_select :fruit_id, ::Fruit.all, :id, :name, {include_blank: \"Select fruit\", bootstrap: {help_text: false}}, {selected: form.object.fruit_id, onchange: \"this.form.submit();\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_fruit_id\"\u003eFavorite fruit\u003c/label\u003e\n  \u003cselect onchange=\"this.form.submit();\" class=\"form-select\" aria-required=\"true\" required=\"required\" name=\"user[fruit_id]\" id=\"user_fruit_id\"\u003e\n    \u003coption value=\"\"\u003eSelect fruit\u003c/option\u003e\n    \u003coption value=\"1\"\u003eMango\u003c/option\u003e\n    \u003coption value=\"2\"\u003eApple\u003c/option\u003e\n    \u003coption value=\"3\"\u003eOrange\u003c/option\u003e\n    \u003coption value=\"4\"\u003eWatermelon\u003c/option\u003e\n  \u003c/select\u003e\n\u003c/div\u003e\n```\n\n### grouped_collection_select\n\nOur `grouped_collection_select` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-grouped_collection_select).\nHere's an example of how you pass both options and html_options hashes:\n\n![grouped_collection_select](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/d8f90065-3aa8-4d52-9c3e-0486324b3624)\n\n```erb\n\u003c%= form.grouped_collection_select :city, ::Country.includes(:cities), :cities, :name, :id, :name, {include_blank: \"Select city\", bootstrap: {floating: true}}, {onchange: \"this.form.submit();\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003cdiv class=\"form-floating\"\u003e\n    \u003cselect onchange=\"this.form.submit();\" class=\"form-select\" aria-required=\"true\" required=\"required\" placeholder=\"City\" name=\"user[city]\" id=\"user_city\"\u003e\n      \u003coption value=\"\"\u003eSelect city\u003c/option\u003e\n      \u003coptgroup label=\"India\"\u003e\n        \u003coption value=\"1\"\u003eMumbai\u003c/option\u003e\n        \u003coption value=\"2\"\u003eNew Delhi\u003c/option\u003e\n        \u003coption value=\"3\"\u003eKolkata\u003c/option\u003e\n        \u003coption value=\"4\"\u003eChennai\u003c/option\u003e\n      \u003c/optgroup\u003e\n      \u003coptgroup label=\"Ireland\"\u003e\n        \u003coption value=\"5\"\u003eDublin\u003c/option\u003e\n        \u003coption value=\"6\"\u003eGalway\u003c/option\u003e\n        \u003coption value=\"7\"\u003eCork\u003c/option\u003e\n        \u003coption value=\"8\"\u003eBelfast\u003c/option\u003e\n      \u003c/optgroup\u003e\n      \u003coptgroup label=\"United States\"\u003e\n        \u003coption value=\"9\"\u003eNew York\u003c/option\u003e\n        \u003coption value=\"10\"\u003eLos Angeles\u003c/option\u003e\n        \u003coption value=\"11\"\u003eSan Francisco\u003c/option\u003e\n        \u003coption value=\"12\"\u003eChicago\u003c/option\u003e\n      \u003c/optgroup\u003e\n      ...\n      ...\n    \u003c/select\u003e\n    \u003clabel class=\"form-label required\" for=\"user_city\"\u003eCity\u003c/label\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n### time_zone_select\n\nOur `time_zone_select` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-time_zone_select).\nHere's an example of how you pass both options and html_options hashes:\n\n![time_zone_select](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/e161585c-1bbf-485c-9baf-c57b15258fe8)\n\n```erb\n\u003c%= form.time_zone_select :timezone, ::ActiveSupport::TimeZone.all, {include_blank: \"Select time zone\", bootstrap: {label_text: \"Preferred time zone\"}}, {onchange: \"this.form.submit();\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_timezone\"\u003ePreferred time zone\u003c/label\u003e\n  \u003cselect onchange=\"this.form.submit();\" class=\"form-select\" name=\"user[timezone]\" id=\"user_timezone\"\u003e\n    \u003coption value=\"\"\u003eSelect time zone\u003c/option\u003e\n    \u003coption value=\"International Date Line West\"\u003e(GMT-12:00) International Date Line West\u003c/option\u003e\n    \u003coption value=\"American Samoa\"\u003e(GMT-11:00) American Samoa\u003c/option\u003e\n    \u003coption value=\"Midway Island\"\u003e(GMT-11:00) Midway Island\u003c/option\u003e\n    \u003coption value=\"Hawaii\"\u003e(GMT-10:00) Hawaii\u003c/option\u003e\n    \u003coption value=\"Alaska\"\u003e(GMT-09:00) Alaska\u003c/option\u003e\n    \u003coption value=\"Pacific Time (US \u0026amp; Canada)\"\u003e(GMT-08:00) Pacific Time (US \u0026amp; Canada)\u003c/option\u003e\n    \u003coption value=\"Tijuana\"\u003e(GMT-08:00) Tijuana\u003c/option\u003e\n    \u003coption value=\"Arizona\"\u003e(GMT-07:00) Arizona\u003c/option\u003e\n    ...\n    ...\n  \u003c/select\u003e\n\u003c/div\u003e\n```\n\n### weekday_select\n\nOur `weekday_select` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-weekday_select).\nHere's an example of how you pass both options and html_options hashes:\n\n![weekday_select](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/e469a57d-3d22-4c9e-829b-4ba825593ae1)\n\n```erb\n\u003c%= form.weekday_select :weekly_off, {selected: \"Monday\", bootstrap: {label_text: \"Week off\"}}, {onchange: \"this.form.submit();\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_weekly_off\"\u003eWeek off\u003c/label\u003e\n  \u003cselect onchange=\"this.form.submit();\" class=\"form-select\" name=\"user[weekly_off]\" id=\"user_weekly_off\"\u003e\n    \u003coption selected=\"selected\" value=\"Monday\"\u003eMonday\u003c/option\u003e\n    \u003coption value=\"Tuesday\"\u003eTuesday\u003c/option\u003e\n    \u003coption value=\"Wednesday\"\u003eWednesday\u003c/option\u003e\n    \u003coption value=\"Thursday\"\u003eThursday\u003c/option\u003e\n    \u003coption value=\"Friday\"\u003eFriday\u003c/option\u003e\n    \u003coption value=\"Saturday\"\u003eSaturday\u003c/option\u003e\n    \u003coption value=\"Sunday\"\u003eSunday\u003c/option\u003e\n  \u003c/select\u003e\n\u003c/div\u003e\n```\n\n### collection_check_boxes\n\nThis helper provides a way to create collection of check boxes. This helper accepts same arguments as [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-collection_check_boxes) except it don't accept a `block` as\nan argument and takes care of rendering labels, check boxes, and wrapper for you. `collection_check_boxes` are rendered by default for multiple option selections, but you can turn them into single selections by passing `options[:multiple] = false`.\n\n![collection_check_boxes](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/c92f5921-e572-4384-812e-31308e018f66)\n\n```erb\n\u003c%= form.collection_check_boxes :skill_ids, ::Skill.all, :id, :name, {bootstrap: {layout: :horizontal, inline: true}, onchange: \"this.form.submit();\"}, {} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"row mb-3\"\u003e\n  \u003clabel class=\"col-form-label col-sm-2 required\" for=\"user_skill_ids\"\u003eSkills\u003c/label\u003e\n  \u003cdiv class=\"col-sm-10\"\u003e\n    \u003cdiv class=\"rails-bootstrap-forms-collection-check-boxes\"\u003e\n      \u003cinput value=\"\" multiple=\"multiple\" autocomplete=\"off\" type=\"hidden\" name=\"user[skill_ids][]\" id=\"user_skill_ids\"\u003e\n      \u003cdiv class=\"form-check form-check-inline\"\u003e\n        \u003cinput onchange=\"this.form.submit();\" class=\"form-check-input\" type=\"checkbox\" value=\"1\" name=\"user[skill_ids][]\" id=\"user_skill_ids_1\"\u003e\n        \u003clabel class=\"form-check-label\" for=\"user_skill_ids_1\"\u003eCommunication\u003c/label\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"form-check form-check-inline\"\u003e\n        \u003cinput onchange=\"this.form.submit();\" class=\"form-check-input\" type=\"checkbox\" value=\"2\" name=\"user[skill_ids][]\" id=\"user_skill_ids_2\"\u003e\n        \u003clabel class=\"form-check-label\" for=\"user_skill_ids_2\"\u003eProblem Solving\u003c/label\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"form-check form-check-inline\"\u003e\n        \u003cinput onchange=\"this.form.submit();\" class=\"form-check-input\" type=\"checkbox\" value=\"3\" name=\"user[skill_ids][]\" id=\"user_skill_ids_3\"\u003e\n        \u003clabel class=\"form-check-label\" for=\"user_skill_ids_3\"\u003eLeadership\u003c/label\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"form-check form-check-inline\"\u003e\n        \u003cinput onchange=\"this.form.submit();\" class=\"form-check-input\" type=\"checkbox\" value=\"4\" name=\"user[skill_ids][]\" id=\"user_skill_ids_4\"\u003e\n        \u003clabel class=\"form-check-label\" for=\"user_skill_ids_4\"\u003eWriting\u003c/label\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"form-check form-check-inline\"\u003e\n        \u003cinput onchange=\"this.form.submit();\" class=\"form-check-input\" type=\"checkbox\" value=\"5\" name=\"user[skill_ids][]\" id=\"user_skill_ids_5\"\u003e\n        \u003clabel class=\"form-check-label\" for=\"user_skill_ids_5\"\u003eCreativity\u003c/label\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"form-check form-check-inline\"\u003e\n        \u003cinput onchange=\"this.form.submit();\" class=\"form-check-input\" type=\"checkbox\" value=\"6\" name=\"user[skill_ids][]\" id=\"user_skill_ids_6\"\u003e\n        \u003clabel class=\"form-check-label\" for=\"user_skill_ids_6\"\u003eTime Management\u003c/label\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"form-check form-check-inline\"\u003e\n        \u003cinput onchange=\"this.form.submit();\" class=\"form-check-input\" type=\"checkbox\" value=\"7\" name=\"user[skill_ids][]\" id=\"user_skill_ids_7\"\u003e\n        \u003clabel class=\"form-check-label\" for=\"user_skill_ids_7\"\u003eTeam Work\u003c/label\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"form-check form-check-inline\"\u003e\n        \u003cinput onchange=\"this.form.submit();\" class=\"form-check-input\" type=\"checkbox\" value=\"8\" name=\"user[skill_ids][]\" id=\"user_skill_ids_8\"\u003e\n        \u003clabel class=\"form-check-label\" for=\"user_skill_ids_8\"\u003eNegotiation\u003c/label\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"form-check form-check-inline\"\u003e\n        \u003cinput onchange=\"this.form.submit();\" class=\"form-check-input\" type=\"checkbox\" value=\"9\" name=\"user[skill_ids][]\" id=\"user_skill_ids_9\"\u003e\n        \u003clabel class=\"form-check-label\" for=\"user_skill_ids_9\"\u003eDecision Making\u003c/label\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"form-check form-check-inline\"\u003e\n        \u003cinput onchange=\"this.form.submit();\" class=\"form-check-input\" type=\"checkbox\" value=\"10\" name=\"user[skill_ids][]\" id=\"user_skill_ids_10\"\u003e\n        \u003clabel class=\"form-check-label\" for=\"user_skill_ids_10\"\u003eManagement\u003c/label\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"form-text text-muted\"\u003eSelect your strong skills\u003c/div\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n_If form layout is inline, `collection_check_boxes` always render `inline` check boxes._\n\n### collection_radio_buttons\n\nThis helper provides a way to create collection of radio buttons. This helper accepts same arguments as [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-collection_radio_buttons) except it don't accept a `block` as\nan argument and takes care of rendering labels, radio button, and wrapper for you.\n\n![collection_radio_buttons](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/798a8b0c-915a-40b1-9874-dd74f50d3695)\n\n```erb\n\u003c%= form.collection_radio_buttons :fruit_id, ::Fruit.all, :id, :name, {checked: form.object.fruit_id, bootstrap: {layout: :horizontal, inline: true}}, {} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"row mb-3\"\u003e\n  \u003clabel class=\"col-form-label col-sm-2 required\" for=\"user_fruit_id\"\u003eFavorite fruit\u003c/label\u003e\n  \u003cdiv class=\"col-sm-10\"\u003e\n    \u003cdiv class=\"rails-bootstrap-forms-collection-radio-buttons\"\u003e\n      \u003cdiv class=\"form-check form-check-inline\"\u003e\n        \u003cinput class=\"form-check-input\" type=\"radio\" value=\"1\" name=\"user[fruit_id]\" id=\"user_fruit_id_1\"\u003e\n        \u003clabel class=\"form-check-label\" for=\"user_fruit_id_1\"\u003eMango\u003c/label\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"form-check form-check-inline\"\u003e\n        \u003cinput class=\"form-check-input\" type=\"radio\" value=\"2\" name=\"user[fruit_id]\" id=\"user_fruit_id_2\"\u003e\n        \u003clabel class=\"form-check-label\" for=\"user_fruit_id_2\"\u003eApple\u003c/label\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"form-check form-check-inline\"\u003e\n        \u003cinput class=\"form-check-input\" type=\"radio\" value=\"3\" name=\"user[fruit_id]\" id=\"user_fruit_id_3\"\u003e\n        \u003clabel class=\"form-check-label\" for=\"user_fruit_id_3\"\u003eOrange\u003c/label\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"form-check form-check-inline\"\u003e\n        \u003cinput class=\"form-check-input\" type=\"radio\" value=\"4\" name=\"user[fruit_id]\" id=\"user_fruit_id_4\"\u003e\n        \u003clabel class=\"form-check-label\" for=\"user_fruit_id_4\"\u003eWatermelon\u003c/label\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"form-text text-muted\"\u003eSelect your favorite fruit\u003c/div\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n_If form layout is inline, `collection_check_boxes` always render `inline` check boxes._\n\n## Date Helpers\n\nThe multiple selects that the date and time helpers (`date_select`, `time_select`, `datetime_select`) generate are wrapped inside a `fieldset.rails-bootstrap-forms-[date|time|datetime]-select` tag.\nThis is because Bootstrap automatically styles our controls as blocks. This wrapper fixes this defining these selects as `inline-block` and a width of `auto`.\nIn order to apply addition options of `rails_bootstrap_form`, `bootstrap` object is passed in `options` argument of the helper.\n\n### date_select\n\nOur `date_select` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#method-i-date_select).\nHere's an example of how you pass both options and html_options hashes:\n\n![date_select](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/45fe5d72-43da-498e-a1c2-ac6729446bba)\n\n```erb\n\u003c%= form.date_select :interview_date, {selected: form.object.interview_date, bootstrap: {label_text: \"Choose interview date\"}}, {onchange: \"this.form.submit();\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_interview_date\"\u003eChoose interview date\u003c/label\u003e\n  \u003cfieldset class=\"rails-bootstrap-forms-date-select\"\u003e\n    \u003cselect id=\"user_interview_date_1i\" name=\"user[interview_date(1i)]\" onchange=\"this.form.submit();\" class=\"form-select\"\u003e\n      \u003coption value=\"2018\"\u003e2018\u003c/option\u003e\n      \u003coption value=\"2019\"\u003e2019\u003c/option\u003e\n      \u003coption value=\"2020\"\u003e2020\u003c/option\u003e\n      \u003coption value=\"2021\"\u003e2021\u003c/option\u003e\n      \u003coption value=\"2022\"\u003e2022\u003c/option\u003e\n      \u003coption value=\"2023\" selected=\"selected\"\u003e2023\u003c/option\u003e\n      ...\n      ...\n    \u003c/select\u003e\n    \u003cselect id=\"user_interview_date_2i\" name=\"user[interview_date(2i)]\" onchange=\"this.form.submit();\" class=\"form-select\"\u003e\n      \u003coption value=\"1\"\u003eJanuary\u003c/option\u003e\n      \u003coption value=\"2\"\u003eFebruary\u003c/option\u003e\n      \u003coption value=\"3\"\u003eMarch\u003c/option\u003e\n      \u003coption value=\"4\"\u003eApril\u003c/option\u003e\n      \u003coption value=\"5\" selected=\"selected\"\u003eMay\u003c/option\u003e\n      ...\n      ...\n    \u003c/select\u003e\n    \u003cselect id=\"user_interview_date_3i\" name=\"user[interview_date(3i)]\" onchange=\"this.form.submit();\" class=\"form-select\"\u003e\n      \u003coption value=\"1\"\u003e1\u003c/option\u003e\n      \u003coption value=\"2\"\u003e2\u003c/option\u003e\n      \u003coption value=\"3\"\u003e3\u003c/option\u003e\n      \u003coption value=\"4\"\u003e4\u003c/option\u003e\n      \u003coption value=\"5\"\u003e5\u003c/option\u003e\n      \u003coption value=\"6\"\u003e6\u003c/option\u003e\n      \u003coption value=\"7\"\u003e7\u003c/option\u003e\n      \u003coption value=\"8\" selected=\"selected\"\u003e8\u003c/option\u003e\n      ...\n      ...\n    \u003c/select\u003e\n  \u003c/fieldset\u003e\n\u003c/div\u003e\n```\n\n### time_select\n\nOur `time_select` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#method-i-time_select).\nHere's an example of how you pass both options and html_options hashes:\n\n![time_select](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/2195922c-c7cc-48dc-9912-3ef3cbb8e017)\n\n```erb\n\u003c%= form.time_select :interview_time, {selected: form.object.interview_time, bootstrap: {label_text: \"Choose interview time\"}}, {onchange: \"this.form.submit();\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_interview_time\"\u003eChoose interview time\u003c/label\u003e\n  \u003cfieldset class=\"rails-bootstrap-forms-time-select\"\u003e\n    \u003cinput type=\"hidden\" id=\"user_interview_time_1i\" name=\"user[interview_time(1i)]\" value=\"1\" autocomplete=\"off\"\u003e\n    \u003cinput type=\"hidden\" id=\"user_interview_time_2i\" name=\"user[interview_time(2i)]\" value=\"1\" autocomplete=\"off\"\u003e\n    \u003cinput type=\"hidden\" id=\"user_interview_time_3i\" name=\"user[interview_time(3i)]\" value=\"1\" autocomplete=\"off\"\u003e\n    \u003cselect id=\"user_interview_time_4i\" name=\"user[interview_time(4i)]\" onchange=\"this.form.submit();\" class=\"form-select\"\u003e\n      \u003coption value=\"00\"\u003e00\u003c/option\u003e\n      \u003coption value=\"01\"\u003e01\u003c/option\u003e\n      \u003coption value=\"02\"\u003e02\u003c/option\u003e\n      \u003coption value=\"03\"\u003e03\u003c/option\u003e\n      \u003coption value=\"04\"\u003e04\u003c/option\u003e\n      ...\n      ...\n    \u003c/select\u003e\n    :\n    \u003cselect id=\"user_interview_time_5i\" name=\"user[interview_time(5i)]\" onchange=\"this.form.submit();\" class=\"form-select\"\u003e\n      \u003coption value=\"00\"\u003e00\u003c/option\u003e\n      \u003coption value=\"01\"\u003e01\u003c/option\u003e\n      \u003coption value=\"02\"\u003e02\u003c/option\u003e\n      \u003coption value=\"03\"\u003e03\u003c/option\u003e\n      \u003coption value=\"04\"\u003e04\u003c/option\u003e\n      \u003coption value=\"05\"\u003e05\u003c/option\u003e\n      ...\n      ...\n    \u003c/select\u003e\n  \u003c/fieldset\u003e\n\u003c/div\u003e\n```\n\n### datetime_select\n\nOur `datetime_select` helper accepts the same arguments as the [default Rails helper](https://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#method-i-datetime_select).\nHere's an example of how you pass both options and html_options hashes:\n\n![datetime_select](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/c0e0cd83-d44a-4308-bfa9-e25a2a488d66)\n\n```erb\n\u003c%= form.datetime_select :interview_datetime, {selected: form.object.interview_datetime, bootstrap: {label_text: \"Choose interview date \u0026 time\"}}, {onchange: \"this.form.submit();\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_interview_datetime\"\u003eChoose interview date \u0026amp; time\u003c/label\u003e\n  \u003cfieldset class=\"rails-bootstrap-forms-datetime-select\"\u003e\n    \u003cselect id=\"user_interview_datetime_1i\" name=\"user[interview_datetime(1i)]\" onchange=\"this.form.submit();\" class=\"form-select\"\u003e\n      \u003coption value=\"2018\"\u003e2018\u003c/option\u003e\n      \u003coption value=\"2019\"\u003e2019\u003c/option\u003e\n      \u003coption value=\"2020\"\u003e2020\u003c/option\u003e\n      \u003coption value=\"2021\"\u003e2021\u003c/option\u003e\n      ...\n      ...\n    \u003c/select\u003e\n    \u003cselect id=\"user_interview_datetime_2i\" name=\"user[interview_datetime(2i)]\" onchange=\"this.form.submit();\" class=\"form-select\"\u003e\n      \u003coption value=\"1\"\u003eJanuary\u003c/option\u003e\n      \u003coption value=\"2\"\u003eFebruary\u003c/option\u003e\n      \u003coption value=\"3\"\u003eMarch\u003c/option\u003e\n      \u003coption value=\"4\"\u003eApril\u003c/option\u003e\n      ...\n      ...\n    \u003c/select\u003e\n    \u003cselect id=\"user_interview_datetime_3i\" name=\"user[interview_datetime(3i)]\" onchange=\"this.form.submit();\" class=\"form-select\"\u003e\n      \u003coption value=\"1\"\u003e1\u003c/option\u003e\n      \u003coption value=\"2\"\u003e2\u003c/option\u003e\n      \u003coption value=\"3\"\u003e3\u003c/option\u003e\n      \u003coption value=\"4\"\u003e4\u003c/option\u003e\n      \u003coption value=\"5\"\u003e5\u003c/option\u003e\n      \u003coption value=\"6\"\u003e6\u003c/option\u003e\n      ...\n      ...\n    \u003c/select\u003e\n    —\n    \u003cselect id=\"user_interview_datetime_4i\" name=\"user[interview_datetime(4i)]\" onchange=\"this.form.submit();\" class=\"form-select\"\u003e\n      \u003coption value=\"00\"\u003e00\u003c/option\u003e\n      \u003coption value=\"01\"\u003e01\u003c/option\u003e\n      \u003coption value=\"02\"\u003e02\u003c/option\u003e\n      \u003coption value=\"03\"\u003e03\u003c/option\u003e\n      \u003coption value=\"04\"\u003e04\u003c/option\u003e\n      ...\n      ...\n    \u003c/select\u003e\n    :\n    \u003cselect id=\"user_interview_datetime_5i\" name=\"user[interview_datetime(5i)]\" onchange=\"this.form.submit();\" class=\"form-select\"\u003e\n      \u003coption value=\"00\"\u003e00\u003c/option\u003e\n      \u003coption value=\"01\"\u003e01\u003c/option\u003e\n      \u003coption value=\"02\"\u003e02\u003c/option\u003e\n      \u003coption value=\"03\"\u003e03\u003c/option\u003e\n      \u003coption value=\"04\"\u003e04\u003c/option\u003e\n      ...\n      ...\n    \u003c/select\u003e\n  \u003c/fieldset\u003e\n\u003c/div\u003e\n```\n\n## Submit Buttons\n\n`rails_bootstrap_form` allows to easily create submit button for the form. `rails_bootstrap_form` supports three color variants for submit buttons: `secondary`, `primary`, and `danger`. Submit buttons are supported in `vertical`, `horizontal`, and `inline` layout.\nSubmit buttons in inline form are wrapped inside `div.col-12` to properly align on small width devices.\n\n![button_helpers](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/f41a013b-b8c9-4689-a079-b8b102084cf0)\n\n```erb\n\u003c%= form.secondary \"Search\" %\u003e\n\u003c%= form.primary \"Register\" %\u003e\n\u003c%= form.danger \"Delete\" %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cinput type=\"submit\" name=\"commit\" value=\"Search\" class=\"btn btn-secondary\" data-disable-with=\"Search\"\u003e\n\u003cinput type=\"submit\" name=\"commit\" value=\"Register\" class=\"btn btn-primary\" data-disable-with=\"Register\"\u003e\n\u003cinput type=\"submit\" name=\"commit\" value=\"Delete\" class=\"btn btn-danger\" data-disable-with=\"Delete\"\u003e\n```\n\nIt is also possible to pass additional classes to the button helpers using HTML `class` attribute and that class will be\nadded along with default class of the submit helper.\n\n![button_additional_class](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/d9493c36-5c18-4e2a-bb36-e8a947c16bfe)\n\n```erb\n\u003c%= form.primary \"Register\", class: \"register-button\" %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cinput type=\"submit\" name=\"commit\" value=\"Register\" class=\"register-button btn btn-primary\" data-disable-with=\"Register\"\u003e\n```\n\nTo render submit helper as a button helper, you can set `render_as_button: true` option or pass a block.\n\n![render_as_button](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/dffd72d8-3acf-4029-be04-3bf7776e8d9c)\n\n```erb\n\u003c%= form.primary \"Register\", bootstrap: {render_as_button: true} %\u003e\n\u003c%= form.secondary do %\u003e\n  Sign in\n\u003c% end %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cbutton name=\"button\" type=\"submit\" class=\"btn btn-primary\"\u003eRegister\u003c/button\u003e\n\u003cbutton name=\"button\" type=\"submit\" class=\"btn btn-secondary\"\u003e\n  Sign in\n\u003c/button\u003e\n```\n\n## Static controls\n\n`rails_bootstrap_form` provides form helper `static_field` to render static controls which internally uses [text_field](#text_field) form helper.\nIt sets `readonly` and `disabled` attributes on the text field. By default, `static_field` applies `form-control-plaintext`\nCSS class to the control but you can change it by using option `static_field_class`.\n\nYou can create a static controls like this:\n\n![static_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/cb7cc64f-c405-4abb-8ca9-66fe4c2fff98)\n\n```erb\n\u003c%= form.static_field :email %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_email\"\u003eEmail address\u003c/label\u003e\n  \u003cinput readonly=\"readonly\" disabled=\"disabled\" value=\"test@example.com\" class=\"form-control-plaintext\" aria-required=\"true\" required=\"required\" type=\"text\" name=\"user[email]\" id=\"user_email\"\u003e\n\u003c/div\u003e\n```\n\n_`static_field` supports all the bootstrap options which are supported by `text_field`._\n\n## Floating Labels\n\nThe `floating` option can be used to enable Bootstrap floating labels. This option is supported on text fields, text areas and dropdowns. Here's an example:\n\n![floating_labels](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/3976629d-4717-47b0-ab91-9a16e6c9ed5f)\n\n```erb\n\u003c%= bootstrap_form_for @user, bootstrap: {floating: true} do |form| %\u003e\n  \u003c%= form.text_field :name %\u003e\n  \u003c%= form.email_field :username %\u003e\n  \u003c%= form.password_field :password %\u003e\n  \u003c%= form.fields_for :address, include_id: false do |address_form| %\u003e\n    \u003c%= address_form.text_area :street %\u003e\n    \u003c%= address_form.select :country_id, options_for_select(::Country.pluck(:name, :id), address_form.object.country_id),\n        {include_blank: \"Select Country\"} %\u003e\n  \u003c% end %\u003e\n  \u003c%= form.primary \"Register\" %\u003e\n\u003c% end %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cform novalidate=\"novalidate\" class=\"new_user\" id=\"new_user\" action=\"/users\" accept-charset=\"UTF-8\" method=\"post\"\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003cdiv class=\"form-floating\"\u003e\n      \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" placeholder=\"Name\" type=\"text\" name=\"user[name]\" id=\"user_name\"\u003e\n      \u003clabel class=\"form-label required\" for=\"user_name\"\u003eName\u003c/label\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003cdiv class=\"form-floating\"\u003e\n      \u003cinput class=\"form-control\" placeholder=\"Username\" type=\"email\" name=\"user[username]\" id=\"user_username\"\u003e\n      \u003clabel class=\"form-label\" for=\"user_username\"\u003eUsername\u003c/label\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003cdiv class=\"form-floating\"\u003e\n      \u003cinput class=\"form-control\" aria-required=\"true\" required=\"required\" placeholder=\"Password\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n      \u003clabel class=\"form-label required\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003cdiv class=\"form-floating\"\u003e\n      \u003ctextarea class=\"form-control\" aria-required=\"true\" required=\"required\" placeholder=\"Street\" name=\"user[address_attributes][street]\" id=\"user_address_attributes_street\"\u003e\u003c/textarea\u003e\n      \u003clabel class=\"form-label required\" for=\"user_address_attributes_street\"\u003eStreet\u003c/label\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003cdiv class=\"form-floating\"\u003e\n      \u003cselect class=\"form-select\" aria-required=\"true\" required=\"required\" placeholder=\"Country\" name=\"user[address_attributes][country_id]\" id=\"user_address_attributes_country_id\"\u003e\n        \u003coption value=\"\"\u003eSelect Country\u003c/option\u003e\n        \u003coption value=\"1\"\u003eIndia\u003c/option\u003e\n        \u003coption value=\"2\"\u003eIreland\u003c/option\u003e\n        \u003coption value=\"3\"\u003eUnited States\u003c/option\u003e\n        \u003coption value=\"4\"\u003eUnited Kingdom\u003c/option\u003e\n      \u003c/select\u003e\n      \u003clabel class=\"form-label required\" for=\"user_address_attributes_country_id\"\u003eCountry\u003c/label\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cinput type=\"submit\" name=\"commit\" value=\"Register\" class=\"btn btn-primary\" data-disable-with=\"Register\"\u003e\n\u003c/form\u003e\n```\n\n_`rails_bootstrap_form` automatically disables floating labels for unsupported helpers._\n\n## Validation and Errors\n\nBy default, `rails_bootstrap_form` generations in-line errors which appear below the field.\n\n### Inline Errors\n\nBy default, fields that have validation errors will be outlined in red and the error will be displayed below the field. Here's an example:\n\n![inline_errors](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/a1cef10d-ba21-4d97-97e7-919691e2afe3)\n\n```erb\n\u003c%= bootstrap_form_for @user do |form| %\u003e\n  \u003c%= form.email_field :email %\u003e\n  \u003c%= form.password_field :password %\u003e\n  \u003c%= form.primary \"Register\" %\u003e\n\u003c% end %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cform novalidate=\"novalidate\" class=\"new_user\" id=\"new_user\" action=\"/users\" accept-charset=\"UTF-8\" method=\"post\"\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003clabel class=\"form-label required is-invalid\" for=\"user_email\"\u003eEmail address\u003c/label\u003e\n    \u003cinput class=\"form-control is-invalid\" aria-required=\"true\" required=\"required\" type=\"email\" name=\"user[email]\" id=\"user_email\"\u003e\n    \u003cdiv class=\"invalid-feedback\"\u003ecan't be blank\u003c/div\u003e\n    \u003cdiv class=\"form-text text-muted\"\u003ePlease use official email address\u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"mb-3\"\u003e\n    \u003clabel class=\"form-label required is-invalid\" for=\"user_password\"\u003ePassword\u003c/label\u003e\n    \u003cinput class=\"form-control is-invalid\" aria-required=\"true\" required=\"required\" type=\"password\" name=\"user[password]\" id=\"user_password\"\u003e\n    \u003cdiv class=\"invalid-feedback\"\u003ecan't be blank\u003c/div\u003e\n  \u003c/div\u003e\n  \u003cinput type=\"submit\" name=\"commit\" value=\"Register\" class=\"btn btn-primary\" data-disable-with=\"Register\"\u003e\n\u003c/form\u003e\n```\n\nInline errors are also supported if the field is wrapped inside of input group and has floating label:\n\n![floating_inline_errors](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/89deb618-3f06-463b-91fb-60c50794387c)\n\n```erb\n\u003c%= form.text_field :expected_ctc, bootstrap: {floating: true, prepend: \"$\", append: \"0.0\"} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003cdiv class=\"input-group has-validation\"\u003e\n    \u003cspan class=\"input-group-text\"\u003e$\u003c/span\u003e\n    \u003cdiv class=\"form-floating is-invalid\"\u003e\n      \u003cinput class=\"form-control is-invalid\" aria-required=\"true\" required=\"required\" placeholder=\"Expected CTC\" type=\"text\" value=\"\" name=\"user[expected_ctc]\" id=\"user_expected_ctc\"\u003e\n      \u003clabel class=\"form-label required is-invalid\" for=\"user_expected_ctc\"\u003eExpected CTC\u003c/label\u003e\n    \u003c/div\u003e\n    \u003cspan class=\"input-group-text\"\u003e0.0\u003c/span\u003e\n    \u003cdiv class=\"invalid-feedback\"\u003ecan't be blank\u003c/div\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\nThe `has-validation` CSS class is added to an input group when the field has errors.\nThe `is-invalid` CSS class is added to floating label container when field with floating label has errors.\n\n## Required Fields\n\nA label that is associated with a mandatory field is automatically annotated with a `required` CSS class. `rails_bootstrap_form` provides styling for required fields.\nYou're also free to add any appropriate CSS to style required fields as desired.\n\nThe label `required` class is determined based on the definition of a presence validator with the associated model attribute. Presently this is one of: `ActiveRecord::Validations::PresenceValidator` or `ActiveModel::Validations::PresenceValidator`.\n\nIn cases where this behaviour is undesirable, use the required option to force the class to be present or absent:\n\n![required_field](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/d99043f0-c382-4597-81bb-e96f27033e65)\n\n```\n\u003c%= form.date_field :birth_date, required: false %\u003e\n\u003c%= form.url_field :blog_url, required: true %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label\" for=\"user_birth_date\"\u003eBirth date\u003c/label\u003e\n  \u003cinput class=\"form-control\" type=\"date\" name=\"user[birth_date]\" id=\"user_birth_date\"\u003e\n\u003c/div\u003e\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_blog_url\"\u003eBlog URL\u003c/label\u003e\n  \u003cinput required=\"required\" class=\"form-control\" aria-required=\"true\" type=\"url\" name=\"user[blog_url]\" id=\"user_blog_url\"\u003e\n\u003c/div\u003e\n```\n\n### Required `belongs_to` associations\n\nAdding a form control for a `belongs_to` associated field will automatically pick up the associated presence validator.\n\n![belongs_to_presence](https://github.com/shivam091/rails_bootstrap_form/assets/7858927/feb279d8-a742-42c2-b13d-8e5a0f60dfa2)\n\n```erb\n\u003c%= form.collection_radio_buttons :fruit_id, ::Fruit.all, :id, :name, {checked: form.object.fruit_id} %\u003e\n```\n\nThis generates the following HTML:\n\n```html\n\u003cdiv class=\"mb-3\"\u003e\n  \u003clabel class=\"form-label required\" for=\"user_fruit_id\"\u003eFavorite fruit\u003c/label\u003e\n  \u003cdiv class=\"rails-bootstrap-forms-collection-radio-buttons\"\u003e\n    \u003cdiv class=\"form-check form-check-inline\"\u003e\n      \u003cinput class=\"form-check-input\" type=\"radio\" value=\"1\" name=\"user[fruit_id]\" id=\"user_fruit_id_1\"\u003e\n      \u003clabel class=\"form-check-label\" for=\"user_fruit_id_1\"\u003eMango\u003c/label\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"form-check form-check-inline\"\u003e\n      \u003cinput class=\"form-check-input\" type=\"radio\" value=\"2\" name=\"user[fruit_id]\" id=\"user_fruit_id_2\"\u003e\n      \u003clabel class=\"form-check-label\" for=\"user_fruit_id_2\"\u003eApple\u003c/label\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"form-check form-check-inline\"\u003e\n      \u003cinput class=\"form-check-input\" type=\"radio\" value=\"3\" name=\"user[fruit_id]\" id=\"user_fruit_id_3\"\u003e\n      \u003clabel class=\"form-check-label\" for=\"user_fruit_id_3\"\u003eOrange\u003c/label\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"form-check form-check-inline\"\u003e\n      \u003cinput class=\"form-check-input\" type=\"radio\" value=\"4\" name=\"user[fruit_id]\" id=\"user_fruit_id_4\"\u003e\n      \u003clabel class=\"form-check-label\" for=\"user_fruit_id_4\"\u003eWatermelon\u003c/label\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"form-text text-muted\"\u003eSelect your favorite fruit\u003c/div\u003e\n\u003c/div\u003e\n```\n\n## Internationalization\n\n`rails_bootstrap_form` follows standard rails conventions so it's i18n-ready. See more [here](http://guides.rubyonrails.org/i18n.html#translations-for-active-record-models)\n\n## Other Tips\n\n### Empty But Visible Labels\n\nSome third party plug-ins require an empty but visible label on an input control. The `hide_label` option generates a label that won't appear on the screen, but it's considered invisible and therefore doesn't work with such a plug-in. An empty label (e.g. `\"\"`) causes the underlying Rails helpers to generate a label based on the field's attribute's name.\n\nThe solution is to use a zero-width character for the label, or some other \"empty\" HTML. For example:\n\n```erb\nbootstrap: {label_text: \"\u0026#8203;\".html_safe}\n```\n\nor\n\n```erb\nbootstrap: {label_text: \"\u003cspan\u003e\u003c/span\u003e\".html_safe}\n```\n\n## Contributing\n\nI welcome contributions. If you wish to contribute in `rails_bootstrap_form`, please review the [Contributing](/CONTRIBUTING.md) document first.\n\n## License\n\nCopyright 2023 [Harshal V. LADHE](https://github.com/shivam091), Released under the MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivam091%2Frails_bootstrap_form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshivam091%2Frails_bootstrap_form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivam091%2Frails_bootstrap_form/lists"}