similar to: Nesting select and text_field in radio_button

Displaying 20 results from an estimated 3000 matches similar to: "Nesting select and text_field in radio_button"

2010 Aug 23
3
Unable to upload images using native rails file upload
I am a rails newbie and am trying to build my first app. I have a jobs and categories controller and models respectively. CONTROLLER: def new @job = Job.new @catergory = Catergory.all respond_to do |format| format.html # new.html.erb format.xml { render :xml => @job } end end #THIS IS A group of 10 RADIO_BUTTONS TO SELECT A CATEGORY FROM. BY DEFAULT THE FIRST
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 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 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
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,
2007 Feb 27
2
Dynamically add radio buttons to forms?
Good afternoon all I''m trying to implement a form that dynamically inserts radio buttons into a form. The user selects options from a drop-down menu. I use observe_field to watch for a change and call back to render the appropriate partial tha contains the radio options. All works nicely but I''m tripped up on one thing: When rendering a form using form_for how do I link those
2005 Dec 27
2
Rewriting FormBuilder
Hi, I want to extend formbuilder to make it output a lable (I know about labeled_form_helper made by technoweenie), my own formating, and a couple of extra tags inside the form attribute. I was easily able to extend form_remote_to. But when I continue to adjust the way elements are handled I don''t know how to continue. I can''t find the method text_field thats should is
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
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 Mar 01
1
observe_field question
I''m sure this is a simple problem, but I''ve been working on it for a couple days and can''t seem to figure out the correct way to structure my observe_field call. The HTML and Javascript generated all appear correct, but the AJAX call is never made. Below is the code I''m using and any help would be much appreciated. models_controller.rb def
2006 Apr 25
2
Noob Question: REgarding Forms ( Take 2 )
I''m hoping there''s an easy way to do this. I''m trying to read options from a database, and insert them into form tags. So for example, In the Database Table: options size: 300 type: text_field maxsize: 300 and I want to create a text_field form tag, with all the appropriate options, is there an easy way to do this, other than having the code output the HTML
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'',
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} %> <%=
2011 Jul 11
39
Help filling out a registration (I think it's called multi tenant)
Do you know when you are filling out a registration for a new account, and you keep pressing next to fill the rest of the information in separate pages? I''d like to do that, but I have no idea how. Basically I have a company model with its information, and a contacts model, with belongs to my company (also each company has only one contact), and I''d like for the user to fill in
2006 Feb 23
5
text_field not populating, but object exists!
Hi I''m having a problem with a little code here, hopefully it''s easy to see what''s happening: <% @lectures.each do |lecture| %> <%= lecture.location%><br /> <%= text_field ''lecture'', ''location'' %> <% end %> The output I get is the text of the ''location'' rendering
2006 Feb 24
2
Formatting values of numbers using text_field
Anyone have a quick solution on how to format a number in a text_field tag? <% text_field "price", "amount" %> returns 100.0 and it would be nice if it showed 100.00 Of course, number_with_precision works nicely, but how do you make that work with text_field? I thought maybe overriding the getter in the model. However, this means I would have to bring the helper
2007 Sep 22
1
Rails newbie: passing a value to hidden form field, then getting it
Warning: I am as green as #00FF00 with rails :-) I have an rhtml view that shows a survey: /views/survey/show.rhtml. I have a Survey model, helper and controller. I''m using the acts_as_commentable plugin to collect comments, and trying to save user comments from users who have taken a survey (don''t ask -- it''s just a test). To save the comment, I need the id of the
2006 May 08
4
<%= text_field %> - how to set the value to session name?
I''m trying to automatically fill a "posted_by" text by with whoever is logged into the session. How do you set the value attribute using "<%= text_field ... %>"??? I''ve tried: <%= text_field ''post'', ''posted_by'', ''value'' => User.find(session[:user_id]).name.capitalize) %> But I get
2007 Sep 18
2
Setting default value in text_field/password_field
I am trying to set a default value in a text_field form. I know how to do this in html, but is there a way to do this with form_for Here is my code <% form_for :user do |f| -%> <p><label for="firstname"%>First Name</label><br/> <%= f.text_field :firstname%></p> ... <p><label for ="email"%>Email</label><br/>