search for: checkbox

Displaying 20 results from an estimated 779 matches for "checkbox".

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...
2009 Mar 18
4
Search Results into new table
I have a search form on my rails site. once the a user has entered a query it displays the results in a table with an extra field button so it can be added to there own portfolio called add to my stocks. How do i get the data for the stock they want to add and put this into a new table called mystocks. Is using a form submit button the right choice? Any examples much appreciated Regards Nick
2011 May 30
5
rails habtm checkboxes with jquerymobile
Hi guys, I have a habtm association working properly. My application consists of both a desktop and a mobile version. My mobile version is made with jquerymobile and I would like my checkboxes in the edit form to look like the checkboxes shown in http://jquerymobile.com/demos/1.0a4.1/#docs/forms/forms-checkboxes.html. My desktop code is the following: <%= check_box_tag "foo[bar_ids][]", bar.id, @foo.bars.include?(bar) %> ...and page source is the following: <input...
2005 Dec 21
3
Checkbox readonly
I declare some checkboxes : <%= check_box_tag ''offers[]'', offer.id , @params[:offers].include?(offer.id.to_s) ,:readonly=>true %> the result is : <input checked="checked" id="offers[]" name="offers[]" readonly="readonly" type="checkbox" v...
2007 Dec 17
6
Checkbox array and Ajax.updater
Hello all, I have some checkbox array like these: <input type=checkbox name=list[] value="1">Java<br> <input type=checkbox name=list[] value="2">JavaScript<br> <input type=checkbox name=list[] value="3">ASP<br> <input type=checkbox name=list[] value="4&quo...
2006 Jun 20
6
checkbox_tag outside a form?
Is it possible to use checkbox_tag outside a form? I''ve put it in a view and it renders but I get nothing back in the params hash. Is there a way to get the value? Like maybe with some JS onsubmit to populate the params hash myself? Thanks, Bill -------------- next part -------------- An HTML attachment was scrubbed...
2007 May 25
3
check box value in array
Hi guys, I have a group of check box in rails page. check box Code as below: <% for count in @total_cellno %> <input name="checkbox" type="checkbox" value="<%= count %>" /> <% end %> I want to receive the selected value in my controller model. @selected_box << params["checkbox"] I guess that it provides values in a array. But @selected_box contains only one selected va...
2009 Jun 28
1
CheckBox and Ruby on Rails
I have two questions: 1. I have a checkbox on a form and after submit I need to check the status of the checkbox. Any idea how to see what the checkbox is set to? I am assuming this must be done in the controller or model but cannot figure it out. 2. On load I am checking for a cookie and need to determine if the checkbox should be check...
2006 May 11
3
multiple checkbox values, convert to string, 1 db field
...te 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 __triangle __square __free __not-free And then the controller (?) would receive those checkbox values, concatenate them together, and stick them in the database. Doesn''t sound too terribly difficult. But... I can''t get it. I try using t...
2006 Jul 14
2
multiple options & checkboxes
Hello, I''m trying to implement a checkbox option function, but I''m having a problem in visualizing how it needs to be implemented. Let me explain. I have a model (User) and another model (Category). I want the user to be able to select multiple categories in the form of checkboxes and have this information stored in the db. Us...
2006 Feb 05
1
Check/uncheck all checkboxes
Hello! I have this page where I list all users in a table. There is checkbox in every row. My User-model has a "checked"-attribute. I have implemented the checkboxes like this: <%= check_box("user[]", "checked") %> Which outputs this: <input id="user_12_checked" name="user[12][checked]" type="checkbox" v...
2008 Jan 08
1
HOWTO: Add a new line, Remove new line?
Hello everyone, I have a couple of checkboxes, where each checkbox belongs to a specific input field (which has a value). So whenever the user clicks on the checkbox, each value of the associated input field is added up and placed in the ''result'' ID. I''m using unobtrusive Javascript to make this happen... However...
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'', ''c...
2006 Jun 20
1
Soliciting suggestions - Form within a Form
Greetings! I could use some suggestions on how to proceed from where I am to where I want to go. I''m working on an app that collects info from the visitor and saves it to a file. The file can later be read in for update. To collect the info, the app presents a form with a set of checkboxes. The state of the checkboxes at initial presentation is controlled by a summary record that is created / populated when the file is read in for updating. The record contains fields for each of the checkboxes with the value = ''y'' or ''n''. In addition to a set...
2006 Jun 04
4
Multiple checkboxes
...9;t seem to get any values out of my params other than "0", Here''s my code: View: <%= form_tag :action=>''save_question''%> <h3><%= @question.title %></h3> </br> <% for option in @options %> <input type="checkbox" name="option[]" value="<%=option.id%>"><%= option.option_text %></br> <% end %> </br> <%= submit_tag%> <%= end_form_tag%> Controller: def save_question @options = Option.find_all_by_question_id(session[:question_id]...
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 share some code example? What I''m not familiar with is how the values are passed on by the form so t...
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...
2006 Apr 04
6
check_box_tag is limited?
...itted 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 a check_box_tag in it and it is unchecked there is absolutely nothing in the params, not :checkbox => 0...Am I the only one that is having trouble with this? In my controllers I have a method that can be called from two different places. One is from a form and another is from a link in another view. My method is currently setup to behave differently depending on the value of the checkbox. I...
2007 Feb 15
1
How to select randomly named checkbox
I am trying to select a checkbox that is randomly named depending on the ID assigned to it by the webpage. [9713816764515361h] is the random bit. #<WWW::Mechanize::CheckBox:0x7a2b3c0 @checked=false, @name="communityContentFields[9713816764515361h].postToArea_checkbox", @value="true"&gt...
2006 Jun 02
2
Group checkbox toggling
This isn''t really a scriptaculous question, but it might be interesting anyway. I''m generating a rails app and in one form I have a grid of check-boxes (rows = A..H and col=1..12). I would like to put a checkbox in the column/row headers to toggle the boxes in a particular row or column. Each box has a name like ''position_A1'' or ''position_H12''. My preferred approach would be to get the name of each checkbox that matches a particular pattern... say /position_A\d+/. How...