Skip to content

3 Formtastic Inputs

Grant Birchmeier edited this page Jan 10, 2017 · 4 revisions

Form Inputs Implemented by Formtastic

The Formtastic input types are:

  • :boolean – a checkbox. Default for column types: :boolean.
  • :check_boxes – a set of check_box inputs. Alternative to :select for ActiveRecord-associations: has_many, and has_and_belongs_to_many.
  • :country – a select menu of country names. Default for column types: :string with name "country" – requires a country_select plugin to be installed.
  • :currency – a select menu of currencies. Default for column types: :string with name "currency" – requires a currency_select plugin to be installed.
  • :date_select – a date select. Default for column types: :date.
  • :datetime – a date and time select. Default for column types: :datetime and :timestamp.
  • :hidden – a hidden field. Creates a hidden field (added for compatibility).
  • :numeric – a text field (just like string). Default for column types: :integer, :float, and :decimal.
  • :password – a password input. Default for column types: :string with name matching @"password"
  • :radio – a set of radio inputs. Alternative to :select for ActiveRecord-associations: belongs_to.
  • :select – a select menu. Default for ActiveRecord associations: belongs_to, has_many, and has_and_belongs_to_many.
  • :string – a text field. Default for column types: :string.
  • :text – a textarea. Default for column types: :text.
  • :time – a time select. Default for column types: :time.
  • :time_zone – a select input. Default for column types: :string with name matching "time_zone".