search for: radio_buttons

Displaying 20 results from an estimated 63 matches for "radio_buttons".

Did you mean: radio_button
2006 May 31
2
Storing a NULL value from a radio_button
Hi, I''ve a boolean database field (tinyint(1)) wich allows nulls. Then, I''ve something like this: radio_button(''server'',''customer_has_login'',"NULL") radio_button(''server'',''customer_has_login'',true) radio_button(''server'',''customer_has_login'',false) The problem is
2006 Jul 01
4
Radio_button in loop problem
Hi all, I can''t figure out why my radio_buttons won''t reflect the values stored in my database. I read through some of the previous posts -- is it true that they don''t work with integers? This is the code I''m using: <% for question in @survey.questions %> <%= debug question %> <%= radio_button...
2006 Jul 06
0
radio_button with boolean fields does not work with postgresql
I don''t know what I am doing wrong. I have a User class with a "send_message_emails" boolean field. The value for this is true. In postgresql this is stored as a "t" in the database. In Rails this field is a boolean and is set to true, but for some reason the following code is *not* working... the radio_button is not selected. <%= radio_button "user",
2005 Mar 07
2
radio_button helper and "checked" option
Does anyone know how to get the radio_button helper to set the html "checked" option? Thanks, Curt
2008 Jul 02
3
attachment in mail
How to do the attachment in mail like the yahoo and gmail does? --~--~---------~--~----~------------~-------~--~----~ 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
2006 Jan 04
4
radio_button method does not recognize int values?
So the api listing says that radio_button(object, method, tag_value, options = {}) gives a radio button tag, and if object.method == tag_value, then the button will be checked. I verified the method behaves correctly for attributes of type string. However, if the attribute is of type int, it doesn''t make the button checked. Does anyone have some information before I file a bug? Some
2006 Aug 10
3
Radio buttons refusing to load checked...
Hi, Having big problems with radio buttons that just don''t make sense: <%= radio_button "events", "impact_type", true %> Positive <%= radio_button "events", "impact_type", false %> Negative This should create two radio buttons with the first one checked by default, right? Cos it doesn''t :( Any ideas would be great, Thanks,
2010 May 19
1
Cannot have both select and radio_button together on the same form
Hello, I''m new to Ruby on Rails. I am creating a form for searching purpose: <% form_for :src_cond, :url => {:action =>''search''} do |p| %> <%= p.radio_button("bd", "1") %> a <%= p.radio_button("bd", "2") %> b <%= p.select :bd2, %w[1 2 3 4],{},{:index=>nil} %> <%=
2006 Apr 04
0
radio_button in a loop not working
Hi! I''m a RoR newbie and i''m trying to make this sample code work... I must be able to choose whether or not to switch lights on/off (one light per line) <table> <% @valeurs.each do |@v| %> <tr> <td>Light <%= Light.find(@v.light_id).nom %>:</td> <td><%= radio_button(''v[]'', ''etat'',
2008 Mar 23
1
radio buttons - how to identify record using value?
I''m making a simple questionnaire app using RoR. I''ve got a model for Questions, a model for Answers, and a third model, Qa, for matching each question to five possible answers through foreign keys. So, each qa has a question and five answers , a1-a5, through belongs_to and a :foreign_key, and then a selected_answer field for specifying which answer was selected by the user. The
2006 Apr 06
1
Puzzled by "radio_button".
I have what seems like simple, working code: <form action="save_dh_options" method="post"> <fieldset> <legend>DH Work Reports</legend> <p>Would you like to fill a work report?</p> <p><%= radio_button("user", "enable_report", "yes") %><label for="yes"> Yes</label><br
2006 Aug 04
2
observe_field for radio_button
Hi, I need to observe a set of radio buttons but am having great trouble. My observe_field looks like this: <%= observe_field :user_select, :frequency => 0, :url => { :action => :admin_control } %> Now it works fine if I use a text_field like this: <%= text_field :user, :select, "size" => 20, "maxlength" => 16 %> But I want a radio button, and
2011 Nov 20
3
Use Ransack with radio buttons for boolean values
Hello I''m trying to search for active and non active users. These radio buttons work just fine except that it didn''t reselect itself after the form has been submitted. So, what should I do to ensure it will be selected just like how my text field populated automatically after the form has been submitted? = search_form_for @q do |f| = f.radio_button :is_active_false, 1 =
2011 Jul 11
2
Pre-populating association
Hello, I think this is an easy one for the average Rails developer but I''m a bit stuck. I''m creating a simple voting app: any user can create a survey, with any number of questions, and other users can then vote by creating a ballot for that survey. Here''s the modeling: class Survey < ActiveRecord::Base has_many :questions has_many :eligibilities has_many
2011 Aug 09
4
Nesting select and text_field in radio_button
...with place attribute. I want to have two fields for Meeting.place = one would be select with places from other meetings or text_field if the place is being used first time. User would be selecting radio_button of which field he has used. So is there any way to nest select and text_field within 2 radio_buttons? I would appreciate any other solution ideas too. Cheers -- 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-/JYPxA39Uh5TLH3MbocFF+G/E...
2006 Jun 21
5
newbie - question on radio_buttons
I have a view with a form and i want to be able to process the button selected in a controller - not sure how to do this. The form does not map directly to a model - all I want to do is be able to pass back the selected button and know which one it is. So, i have a form and several radio buttons - the submit (not shown) takes me to the process_answer action where I want to determine which
2006 Jul 26
0
radio_button groups
For my first rails app, I''m building a web page that will list some restaurants and then have the user rate them from from 1 to 5 using 5 radio buttons. The view code looks like: <h3>Ratings:</h3> <form action="save_ratings" method="post"> <table> <tr> <th>Restaurant</th> <% for rating_option in
2009 Aug 04
6
form_for
hi everybody... I have a form_for in that, onclicking submit button i am calling a javascript for validation.If validation fails that form_for doesnt do anything.But even the validation fails it goes to the controller and action. here my code: <%form_for :promotion_code,
2006 Apr 04
1
using form_remote_tag and radio_button
I want the user to select a date using radio buttons. The following code shows the last 7 days. <%= form_remote_tag(:update => ''register_order'', :url => { :action => :register_orders } ) %> <% 1.upto(7) do |i| %> <%= radio_button "date", "register_date", i.days.ago.strftime("%Y-%m-%d") %>
2006 Mar 22
2
Radio Button Defailt Value?
I have: <%= radio_button ''foo'', ''bar_id'', ''1'' %> <%= radio_button ''foo'', ''bar_id'', ''2'' %> <%= radio_button ''foo'', ''bar_id'', ''3'' %> I would like to have option #3 be selected if foo.bar_id is nil. Is there a way to do