Skip to content

:selected option for :check_boxes #127

Closed
Rio517 opened this Issue Nov 21, 2009 · 12 comments

3 participants

@Rio517
Rio517 commented Nov 21, 2009

Hi,

I has a small feature request. I was hoping you could add a :selected option for inputs :as => :check_boxes. Ideally, you could pass in a single value or an array, so that one might set multiple default selected checkboxes.

Thanks!

@justinfrench
Owner

Yup, good idea.

@grimen
grimen commented Nov 24, 2009

Additions:

  • :selected option should be available for: select, radio, boolean, check_boxes, time_zone (partial), country
  • :selected should accept multiple values for: select (with :multiple => true), check_boxes

Any weird assumptions, or did I forgot any cases?

@justinfrench
Owner

Yes, all correct.

@grimen
grimen commented Nov 27, 2009

Part 4, see:

http://github.com/grimen/formtastic/commit/4d94fb2726fded0dfe0160bc0839991eb40f8fda

I'll not do the country input type now, as it's a bit unclear how that works - 3rd party. Justin, what's ur thoughts on this?

@grimen
grimen commented Nov 28, 2009

This issue is "sort of" done, but I'll leave it up to you Justin to club that. Boink-Boink! =)

@grimen
grimen commented Nov 28, 2009

Added support for this for date/time inputs too, see:

http://github.com/grimen/formtastic/commit/2e641c2ad51e1ca0d4a9b7ab2b14bad5b961fd8a

@justinfrench
Owner

Pulled in, will be in next patch.

@grimen
grimen commented Dec 1, 2009

doing the happy dance ;)

@justinfrench
Owner

Awesome work!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.