Sijo Kg wrote:
> H Vikas
>> %input{:type=>'radio', :name=>'tariff_plan_id', 
>> :value=>"#{plan['service']['name'].downcase}_#{plan['payment_term']['name'].downcase}"}
> 
> Give also give an id to this id=>'tariff_plan_id'
> 
> 
> 
> Sijo

Yes, by giving id to radio button it works.

But I have 5 radio_button with group "tariff_plan_id". If i give same id 
to all of them, there is problem of having same id for 5 radio buttons. 
and I think this is not correct.


- service['all_plans'].each do |plan|
  %input{:type=>'radio', :id => 
"tariff_plan_id_#{plan['service']['name'].downcase}_#{plan['payment_term']['name'].downcase}",
 
:name=>'tariff_plan_id', 
:value=>"#{plan['service']['name'].downcase}_#{plan['payment_term']['name'].downcase}"}


here for each plan one radio button is generated.
So another problem arises that how i know that which radio button is 
selected from "tariff_plan_id" group.

if consider 5 radio buttons are there (may be increased in feature)
then I have to specify

tariff_plan_id_1
tariff_plan_id_2
tariff_plan_id_3
tariff_plan_id_4
tariff_plan_id_5

Thanks,
Vikas


-- 
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to