similar to: radio_button_tag

Displaying 20 results from an estimated 7000 matches similar to: "radio_button_tag"

2008 Aug 21
4
radio_button_tag - examining the selected value
Hi All I have four radio buttons created like this <%= radio_button_tag :answers, 1, false %> a <br/> <%= radio_button_tag :answers, 2, false %> b <br/> <%= radio_button_tag :answers, 3, false %> c <br/> <%= radio_button_tag :answers, 4, false %> d <br/> And then I have a link_to tag to invoke a controller function
2008 May 11
3
radio_button_tag and default checked option
Hi, I can''t get my radio button to be checked by default, here is what I have: <%= f.radio_button :gender, "male", :checked => ''true'' %><p>Male</p> <%= f.radio_button :gender, "female" %><p>Female</p> -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received
2006 Jan 27
1
radio_button_tag quirkiness...
...or my ineptitude? I found that the following is always checking the last ''things'' button regardless of the value of query.table: People:<%= radio_button_tag("query", "table", "P") %> Animals:<%= radio_button_tag("query", "table", "A") %> Things:<%= radio_button_tag("query",
2012 Apr 18
2
RoR - Search Forms with Checkboxes, display appropriate results
I have a form that allows me to search a hotel by city or name and by rating through radio buttons. It all works. However, my hotel model has_one :facility, this facility model is composed by several boolean fields (for example, roomservice:boolean restaurant:boolean and so on) The question is, I want to add checkbox fields for each facility I have and in the search form, when the user selects
2008 May 16
3
radio button observe field only triggers once
Hi, If i add field observers to radio button fields they trigger once but then nothing after that. I have multiple fields in a form that i need to know if one of them changes and which spedific field. Below is an example of two foelds i tested and they trigger once with the alert but then nothing after that. I also tried individual observers for each field test_yes and test_no but with the same
2006 Mar 24
1
Radio Button Tag and hash @Params.
Hi, I''ve a little problem using the Radio Button Tag. I use the " @prove=MODEL.column_names() " to keep attribute names of a table. After i used this code to select a attribute subsets of them : <% i=''0''%> <% for @obj in @prove %> <% @key='':key''+i%> <%= radio_button_tag (@key,@obj) %> <%
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
2006 Jun 28
3
observe_field and radio button... does not work?
I try to catch click event on radio button, but nothing is executed.... Tested with RoR 1.1.2 and 1.1.3. What am I doing wrong? <%= radio_button_tag(:city, ''Dublin'') %> <%= observe_field(:citi, :frequency => 0.5, :on => ''click'', :with => "''city='' +
2009 Feb 26
8
beginners question
hi group, I am making a little rails app to experiment with rails. It consists of one model, item, that represents an item on a todo list. A todo item has a description, a state (finished or not) and a due date. After changing the scaffold screens a bit, I wanted to be able to have no due date. I tried to do this by making a radio button; if ''no date'' is selected, the date
2010 Jan 23
0
Problems with :onchange for radio_button_tag
Greetings, I''ve been hitting my head to the wall over this for quite a while now and don''t seem to be able to wrap my forementioned head around it. Basically I have a list of users in a selection box and I have two radio buttons: Sort by first name and sort by last name. This is what I have in my view: <%= radio_button_tag ''sort_by_last_name'',
2007 Feb 03
7
Interesting radio button behavior with "onclick"
Hello: I have radio buttons like this: <% fields_for :goalhist do |g| %> <table> <tr> <td align=left><%= radio_button_tag (''duedate'', 0, checked = false, options = {:onclick => ""}) %> &nbsp;&nbsp;Start now </td> </tr> <tr id="detailed" style="display: none"><td colspan=2>
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 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
2013 Jun 18
1
How to Pass Jquery selected dropdown values and radio button values to controller
Hi, I have an advance search page and its code is as follows - I have written my code like this <div class="container"> <%= form_tag search_index_path, method: :get do %> <%= radio_button_tag ''user_type'', ''customer'' %><p>Customer</p> <%= radio_button_tag ''user_type'',
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 ( "question", :question_id,
2008 Nov 21
1
list creation interpolation
Hello all, I apologize if this is simple or has already been answered somewhere, but I'm not sure what to search for although I have tried and didn't come up with anything so.. Here's my question. How can I interpolate list names or do I have to do it post list creation. Since that's not very clear here is some sample code of what I wanted to do: >
2006 Mar 01
4
another select_list question - bad bad booleans
I have a select list for a boolean column in postgresql in the ''model'' ... YES_NO = [ [ "Yes", "1" ], [ "No", "0" ] ].freeze in the ''view code'' ... <%= options = [[''Accepted?'', '''']] + Placement::YES_NO select("placement", "accepted",
2008 Apr 09
3
form_tag and form_for cause #protect_from_forgery errors
Hey All, I''m trying to do a simple form_for (and I also get it with form_tag) and I''m getting the following error: ActionView::TemplateError (No :secret given to the #protect_from_forgery call. Set that or use a session store capable of generating its own keys (Cookie Session Store).) on line #2 of users/new.fbml.erb: 1: <h1>Welcome To Courses, Let''s Get
2007 Apr 03
3
end_form_tag
In my logs I can see that end_form_tag is being deprecated. I wanted to make the switch now but cannot get the new end tag to work. THIS WORKS: <%= form_remote_tag :url =>{:action => "next_question", :kwiz_id => @kwiz.id, :position => @next_position} %> <% @question.choices.each do
2006 Jul 26
1
my "observer" is blind
Any body have an idea why my first attempt to use "observe_field" isn''t working? <%= start_form_tag(:name => ''my_form'', :controller => ''boo'' , :action => ''ya'') %> <%= radio_button_tag(''foo'', ''true'', checked = true) %> <%= radio_button_tag(''foo'',