similar to: Puzzled by "radio_button".

Displaying 20 results from an estimated 10000 matches similar to: "Puzzled by "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",
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 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'',
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,
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 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
2005 Jul 19
1
Nested drag and drop rendering issue with ie
First and foremost, excellent library - excellent work. Thank you. Now, here''s what I''m doing: <div id="wrapper"> <fieldset id="page_1"> <legend>Page</legend> <fieldset id="group_1"> Group </fieldset> <fieldset id="group_2"> Group </fieldset>
2006 Oct 11
2
Help please with observe_form - not working
My observe_form is basically totally limp. I think it should update without hitting submit button but even if I hit it , it doesn''t change (doesn''t seem to post the data). Can anyone please take a look and see if I"m doing something wrong. TIA Form: <% start_form_tag({:action => "livesearch"}, :id => "asearch") %>
2006 Oct 12
3
Help with observer_form , javascript error
I''ve set up an observer form, it is not working nor throwing error at least in loading the page. The Firefox javascript console is showing this error: Error: missing } after property list Source File: http://localhost:3000/ajaxsearch/list Line: 165, Column: 45 Source Code: hide(''roller'')}, parameters:''Form.serialize(''asearch'')='' +
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
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 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
2005 Jul 20
3
examples of drag n drop
Sorry if this sounds cynical, ( i do love script.aculo.us scripts ) , but I am wondering if people know of some good real world examples of uses of drag n drop and sortable lists. such a cute script will likely be *ab*used as much as it is used. obviously the point here is to use script.aculo.us to improve the user interface rather than just have some k00l eFX. e.g. the drag n drop instantly
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") %>
2009 Feb 15
2
Collapsible Fieldset
Hey there, (First steps in Ruby and Rails...) I''m trying to make a fieldset collapsible, like they are, for example, on many Drupal pages. What I''ve figuared out is the following: <fieldset id="addressdata" class="collapsible collapsed"> <legend> <%= link_to_function("Show/Hide Addressdata") { |page| page[:
2007 Apr 23
3
getElementsBySelector problem in IE
I''m having this problem with IE and getElementsBySelector, but am a relative js novice, so quite possible -- likely even -- that I''m doing something stupid. Either way, a fresh pair of eyes would help. Basically I''m duplicating a fieldset within a form (so you can upload more than one photo). [BTW, the fieldsets have a CSS id which relates to the object id of the
2007 Nov 06
2
Why is this view spec failing?
I can''t figure out why I am getting a failure. It renders out fine in the browser. <h1>New member</h1> <%= error_messages_for :member %> <% form_for(:member, :url => members_path) do |f| %> <fieldset> <legend>Member Info</legend> <p><label for="member[first_name]">First Name:</label> <%=
2011 Aug 09
4
Nesting select and text_field in radio_button
I''m creating my first Rails app and need an idea creating forms. I have Meeting model 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
2007 Sep 06
1
semi-nube help request
just to show i''m not a complete dork: i receive emails from the list through gmail and i''ve already searched for the answer to this problem and since i''ve been a member i''ve not received an email about it. Google search results are mixed at best. so this is my problem: i have a form: <div id="container"
2007 Jan 18
7
form_tag broken in Rails 1.2 RC2 or is it me?
I''m using Rails 1.2 RC2 and I''ve got a view that uses form_tag and the form is not being rendered. It''s just not there. My view is this: <div class="box"> <fieldset> <legend>Log in</legend> <% form_tag do %> <div class="row"> <div class="formfield"> <label