similar to: Check/uncheck all checkboxes

Displaying 20 results from an estimated 3000 matches similar to: "Check/uncheck all checkboxes"

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
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.
2006 Jul 11
4
checkboxes with a has_many :through relation
All, I''m populating a view with checkboxes in a list. I want to be able to assign to my has_many relationship using the post values of these checkboxes. Essentially, I want to populate the relationship table which will create the correct join values in my model. Here is my check_box_tag code: <%= check_box_tag("@current_job[target_list_ids][]",
2006 Jul 03
9
checkboxes
in the mean time i am using a checkbox like this : <input type="checkbox" name="var[car]" <%= var.car ? ''checked'' : '''' unless @var == nil %> /> but i am sure there is something better than this in rails like <%= checkbox_tag ''var'', ''car'', :checked => true %> but this is not
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
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 11
3
multiple checkbox values, convert to string, 1 db field
Basically what I''m trying to do is create a way for users to enter "keywords" that will then be searchable. I.e., when a user creates a new Item, there is also a keywords field in the database that is a string like "purple triangle free" -- but all the user sees when they are creating the keywords is a series of checkboxes like: __blue __red __purple __circle
2008 May 29
5
f.checkbox?
Okay so I have a typical search page where a keyword is entered and results are retrieved that match the keyword. What I want to do now is have checkboxes to search for results in specific areas (my site is a big events calendar with "streams" and "audiences") I want to use the checkboxes to look for results in ''streams'', ''audiences'', or
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 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.
2009 Apr 18
3
Create CheckBox
Hai, I want to create a checkbox the values are table field values. In my controller @emptypes = Emptypes.find(:all) In View <% @emptypes.each do |c| %> #Write checkbox generating code here <%= check_box("contacts",emptypes.types)%> <%end%> Anyknows please suggest me how to create a checkbox (values are retrived from table). -with Thanking&Regards
2007 Apr 16
6
How to use a form.check_box ?
Hey guys, I''m trying to have a simple webform in my administration section to add a user. I have the text_fields for adding the user''s name, password, and password confirmation, but cannot seem to figure out the checkbox. I want it to be a single checkbox, that if clicked, will set the database column "access" to be "admin" and if its unchecked, set it to be
2006 Feb 25
1
checkbox helper question
I used scaffolding, then modified. As an after thought I added a "boolean" checkbox to my database, form with this tag <p> <%= check_box ''is_hot_item'', @photo.is_hot_item %> <label for="is_hot_item">hot item?</label><br> </p> I check it and save. But I don''t get 1 saved in my database field. :( I have just the
2006 Apr 10
3
Problems with multiple ActiveRecords and Validations
Hi all, I am a RoR newbie and have the following scenario set up: There are 2 ActiveRecords involved, the first one being "User", the second one being "Visibility". The corresponding users table holds address informations regarding a User. The visibilities table holds visibility settings for the individual columns of the users table (i.e. firstname, lastname, country
2007 Mar 30
10
check_box_tag not passing 0 when unchecked?
Code: <%= check_box_tag("person[#{person.id}][is_approved]", 1, true) %> Rendered output: <input checked="checked" id="person[7][is_approved]" name="person[7][is_approved]" value="1" type="checkbox"> Problem: The value of "1" is always passed, even if the box is UNCHECKED. Suggestions? Thanks! -- Posted via
2006 May 31
2
Checkbox Help
Hi guys, I am need to help again. Sorry for the newbie query but would definitely appreciate the help. Here''s the q: I generate a list of items from the database and render them out with a checkbox beside them. A user may click more than one item and I would want to save all checked items into another table. I have been able to give each checkbox a unique id . Would anyone be able
2006 Aug 17
6
Rails and Checkboxes
Hi I''m having a really hard time trying to get a specific form in RoR to work. I''m trying to build a really simple page which lets the user make a pizza by setting check boxes. The choose their toppings, click submit and the form does a callback and shows them how much it will cost to have a pizza with those toppings on. At the moment I have the following: View: <%=
2010 Sep 08
5
Adding a selected checkbox to a new nested model without polluting the model
Context: I have a GoodsReturn model with many ReturnedItem. For the new view, I create a new GoodsReturn with many new ReturnedItems from a sale (and its SoldItems). Problem: I want to have a Add/Selected checkbox with which the user can pick the items he wants to return. I know I could use a ''selected'' virtual attribute but I don''t want to pollute my model just for
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
2006 Apr 23
1
checkboxes for filtered search
I have a page that renders a series of about 20 checkboxes on the left hand side with content on the right. These checkboxes are created from a DB and that part is all working well. What I want to do is have a user click on a checkbox [genres] and have the content on the right be filtered based on the checkbox ticked. If a user clicks on more than one checkbox than only those stories