-
Notifications
You must be signed in to change notification settings - Fork 629
3 Formtastic Inputs
foliosus edited this page Mar 19, 2013
·
4 revisions
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
, andhas_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"
-
:file
– a file field. Default for file-attachment attributes matching: paperclip or attachment_fu.
-
: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
, andhas_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"
.