I think I got it figured out, I ended up writing a small javascript
function that finds the radio button by a unique id and sets its value
accordingly:
$(RadioId).checked = true;
On Mar 7, 7:56 pm, David <dly...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Is there a way to set the default value of a radio button that is
> coded in html with the value from an object? I am trying to set up an
> edit view for this object and am using submit_to_remote, so I cannot
> use the rails radio button helper. These are my radio buttons:
>
> <input id="personal_block_option" type="radio"
name="event
> [block_avail]" value="true" checked="checked">
> <input id="personal_block_option" type="radio"
name="event
> [block_avail]" value="false">
>
> I have an object: @object, is there any way to set the checked to the
> @object.block_avail value?
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---