Michael Satterwhite wrote:> One more question (there''s *ALWAYS* one more <g>)
>
> When a radio button tag is used, the id is taken from the name. However,
> if you have 5 radio buttons in a group, they all have the same name -
> therefore the same id. Among other things (id is only supposed to happen
> once), this seems to preclude the use of a <label> tag for the radio
> buttons.
>
> Obviously, there has to be some way around this. What''s the syntax
for
> specifying a unique id for the radio_button_tag (and the radio_button
> for that matter)
>
> As always, thanks in advance
I do it like this...
<%= radio_button_tag(''free'',
''true'', true, :id =>
''free_radio'') %>
<label for=''free_radio''>I want it for FREE
(I''m a
cheepskate)</label>
<%= radio_button_tag(''free'',
''false'', false, :id =>
''not_free_radio'') %>
<label for=''not_free_radio''>I''m
willing to pay this
much:</label>
best,
jp
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---