Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check_box_group, radio_button_group helpers #27

Closed
nesquena opened this issue Dec 1, 2009 · 5 comments
Closed

check_box_group, radio_button_group helpers #27

nesquena opened this issue Dec 1, 2009 · 5 comments
Assignees
Milestone

Comments

@nesquena
Copy link
Member

nesquena commented Dec 1, 2009

Helpers for check_box_group, radio_button_group which create a set of checkboxes or radio buttons for a form. Pass in a set of options (similar to select helper now) and it returns a set of the checkboxes or radio buttons. add tests as well.

f.radio_button_group :attr, :caption => "...", :options => "same as select options"
f.check_box_group   :attr, :caption => "...", :options => "same as select options"
@WaYdotNET
Copy link
Contributor

up

@ghost ghost assigned nesquena Apr 10, 2011
ujifgc added a commit to ujifgc/padrino-framework that referenced this issue Jan 10, 2013
dariocravero pushed a commit that referenced this issue Jan 12, 2013
Implementing #27, some basic tests
@dariocravero
Copy link

There's one thing we might be missing from what @nesquena proposed and it's the caption. Did you mean to have something like a fieldset with a legend Nathan?

EDIT: We should also consider :uncheck_value => '0' on check_boxes_group to make it the same as the check_box helper?

I'll update the docs tomorrow.

@ujifgc
Copy link
Member

ujifgc commented Jan 12, 2013

No other AbstractFormBuilder helper shows caption, so why should these? I intended f.*_group builders to work like f.select. Actually field_set_tag works outside FormBuilder and has nothing to do with controls.

Also check_boxes_group doesn't need :uncheck_value => '0' because it generates html which sends an array to params: empty or with some values. Originally hidden input was needed to send a zero to params if the only checkbox was not checked.

@dariocravero
Copy link

@ujifgc makes sense. Let's leave it as it is then. Here're the docs. Thanks! :)

@nesquena
Copy link
Member Author

Awesome, this is one of our oldest issues / wishlist ideas finally closed 👍

nesquena added a commit that referenced this issue Oct 16, 2014
Added newly created controller generation options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants