similar to: pass checked boxes to controller

Displaying 20 results from an estimated 10000 matches similar to: "pass checked boxes to controller"

2006 Apr 24
4
javascript in RoR page - Check ALL/uncheck ALL buttons
I am trying to implement a check all and uncheck all button for my check boxes. Here is what I have below. I am getting this error each time: Error: document.myform.add_visit_for_this_Pt has no properties Source File: http://localhost:3000/AddPatientVisit/addvisits Line: 1 Strange that I can''t seem to pass value into the function. Thanks for your help! <SCRIPT
2006 May 02
10
Ruby on Rails w/Dreamhost - routes problem...I think.
I am trying to deploy my first app on Dreamhost using Ruby on Rails. I followed the wiki, but I think I am missing something. I think it may be in my RoR code, but I am not sure. My app runs fine when run as http://localhost:3000/AddPatientVisit/addvisits AddPatientVisit is the controller and addvisits is the form that posts back to the controller. I got rid of the index.html in public
2006 May 02
3
Route problem
I have an index.rhtml is rendered when the (main)controller is loaded. The page contains some check boxes and a submit button. See form code below. When I click the submit button, I get a 404. I don''t know how to post this data back to my controller where method "addvisit" is waiting. It works in WEBrick no problem, but doesn''t work in fcgi on DreamHost. I am
2006 May 21
12
TDD for Rails book?
It seems like half the people on this list are writing a book on Ruby or Rails. For all the hints I''ve seen strewn across the list I have yet to see one that will focus on test-driven development for either Ruby or for Rails. If anyone is looking for a topic, please consider this. I''ve been trying to wrap my brain around the TDD process, but its way of thinking is
2006 Apr 06
16
Rails Masters'' debugging techniques -> Rails Recipes?
Hi, This msg for Chad Fowler or anyone who fits the subject line. I bought the Recipes book and really like the way it has been progressing. There is one subject I''d like to see explored in detail. Having come from Assembly and C background I find that a ''must have'' tool in your collection is the debugger. I find debugging a Rails App the most thorny issue inversely
2006 Oct 15
2
Getting check_box to default to checked?
I''ve tried this (in a new method/template -- so @type doesn''t actually exist yet): check_box ''type'', ''notify_on_create'', {:checked=>''true''} But :checked seems to get swallowed. I''ve also tried setting notify_on_create to true in the Type model, but that doesn''t work either. Any way to get the
2006 Jan 11
6
UK Rates for RoR Contract work?
Hi all, I''ve been offered a short-term contract here in the North of England - around 3 months work, but with RoR I think it will take considerably less time - and am just curious what market rates were right now. I''ve been offered a little under ?1k/week which seems ''right'' for a PHP coder doing this kind of work, but should I be hitting for more, or is
2005 Dec 29
3
Post problem with select lists
hey, i have this problem how come i always get -1 for the select list?? rhtml First, select a client. <select id="client_id" name="client[id]" onChange="submit();" > <%= options_for_select(@client_options, @client_id.to_i) %> </select><%= @client_id %> controller if @request.post? if @request.xml_http_request? #called by ajax,
2006 Apr 18
2
check_box
I''ve got a question on the use of check_box. *** This is working but there just has to be a better way: RHTML: <% for book in @books do %> <tr> <td><%=book.label%></td> <td> <%checked = book.subscribed ? ''checked'': ''nope''%> <%=check_box("book" + book.id.to_s,
2007 Sep 15
3
check_box_tag always checked
#check_box and #check_box_tag are going to be the end of me. Why is this always checked? <% checked = @reservation.selected ? ''checked'' : nil %> <td><%= check_box_tag("reservation[" + @reservation.id.to_s + "][selected]", ''checked'', :checked => checked) %></td>
2006 Jun 07
5
check_box:how to update 2 checkboxes dependent on each other
I''ve got the following problem, I''ve created two check_boxes in my view. The user has to select one check_box, but isn''t allowed to seth both of them together on true. Now i am looking for functionality that can help me doing the folling: Scenario 1 CheckBox1 = True, The user sets CheckBox2 from False to True, now CheckBox1 should automatically become False.
2010 Dec 28
14
cerating multiple cjeck boxes using array
i have a registration form ,i want to store data in corresponding user table in that hobbies field ,i want to store all hobbies in one column so i take multiple check boxes and store in one array all checked values for that i am using below tag,but not working,please any suggestion <%= check_box(:user ,:hobbies,:value =>''Games'') %>Games <%= check_box :user ,
2006 May 09
6
Create checkboxes on page using contents of a hash
Hi all, I have a hash that is created in the index method of my controller. After it is created, the index.rhtml page is rendered. Upon this rendering I would like to create a check box for each key/value in the hash. The has is @recordsHash I have been trying varying stratagies like the one below, but to no avail. Do you have any ideas? Thanks for your help on this! html
2006 Apr 04
6
check_box_tag is limited?
Hello all. Am I going totally nuts here and just want to check (Natch!) something. A normal check_box has two value posssibilities. One for checked and one for unchecked, the value gets submitted with a form. The check_box_tag on the other hand, has a checked_value (Called just ''value'') and for the unchecked value...nothing, zip, nada. This means that if you submit a form with
2006 May 01
3
Make a checkbox checked based on a condition?
I have a series of checkboxes in a form generated as follows: <% for user in @active_users %> <p><%= user.firstname + " " + user.surname%> <%= check_box ''assigned_tasks'', ''user_id'', {:index => user.id}, user.id, nil %></p> <% end %> I''d like to have one of them selected when user.id is equal to the
2009 Oct 06
1
Problems Processing multiple form elements generated by javascript actions
Hi all, After many days of struggling, I have a multi-model form with ajax elements more or less working, but I''m hitting a wall with a few bugs that I can''t figure out. Guidance would be very much appreciated. I''m using the Ryan Bates technique from Advanced Rails recipes to dynamically add and remove elements on a multi-model form.
2005 Apr 17
14
Leaky Webrick (?) & image corruption
Hi guys, After a few days of webrick seeming to use up a ton of ram (the longer it was running, the more ram); izayoi on #rubyonrails kindly suggested changing Dependencies.mechanism in development.rb to :require which appears to have fixed the prob - at the expense of having to restart webrick after making changes to .rb files. Is this a known issue, or is there an alternative solution?
2010 Nov 11
2
Rails 3 - Nested Forms, using Builder -- Check_box issue
Hello, I have the following: My Controller: def new . . @teammembers.each do |teammember| request = @request_thread.requests.build(:recipient_id => teammember.user_id, :full_name => ''Billy Bob T'') end My View: . . <%= f.fields_for :requests do |builder| %> <div class="field"> <%= builder.label
2006 Jul 19
6
Howto: Check_box with a variable (no model)
Hi, I would like to put a checkbox on a form where the input field is a variable rather than a field in a model. The normal way (with a model) would be: <%= check_box(''client'', ''accept'', {}, "1", "0") %> But since accept is a variable @accept and model client will not be there, how do I make a check box work? Regards, Paul
2008 Jun 18
2
check_box_tag with instance variable
hi, i am trying to use one check_box with instance variable and trying to get true or false value from database table. and also please give me solution for multiple check_box and select all how to feed and retrieve value and show in check box. Thanks Purab -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are