Reputation: 175
f.input :rol, as: :radio, :label => "Rol", :collection => [ 'leerling', 'leraar' ]
So how do I know when one of the radio buttons is selected, because when 'leerling' is selected it needs to show a specific part of the form
Upvotes: 1
Views: 961
Reputation: 5112
jQuery >= 1.6
$("#rol").prop('checked', true);
jQuery < 1.6
$("#rol").attr('checked', true);
use distinct id
or class
to check this property
Upvotes: 1