Hi all,

How can i use form_remote_tag inside the form_tag helper .

My application has  following view subscribe.html.haml

- form_tag :action => :subscribe do

  /other form element
  %input{:type=>'radio', :name=>'tariff_plan_id', :value=>"monthly"}
  %input{:type=>'radio', :name=>'tariff_plan_id', :value=>"yearly"}



  - form_remote_tag(:update => "result_discount_code", :url => { :action
=> :discount_code }, :position => "top" ) do

    =text_field 'discount_code'
    =submit_tag 'Apply Discount'

  #result_discount_code



  =submit_tag 'Subscribe'


Can I use form_remote_tag inside the form_tag?


When user hit 'Apply Discount' button i will perform following steps

get the value of radio button "tariff_plan_id" and from this value
get the value from "discount_code" textbox.

perform some operations on these value and
result is show in "result_discount_code" div.

There are two radio buttons. so user can select one of them see what
discount he will get.

Is this a right way to doing this?

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