Displaying 20 results from an estimated 4000 matches similar to: "checkboxes"
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
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 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"
value="1"
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...
URL:
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 
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 Jun 27
2
Bug in Firebug or in RJS? Or something else?
I''m getting a really strange result using RJS page.replace_html and wonder if anybody knows anything that could help me figure it out.
I''m rendering a partial in a loop in edit.rhtml that puts a set of <div>s on the page, each <div> containing a checkbox_tag with an associated observe_field and a text_field_tag also with an associated observe_field.  When the
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 Apr 25
3
Simple Rails Question
Hi, I have a few simple rails questions:
Does the check_box_tag map to an int or to a boolean field within the
database?
Thanks in advance,
-Conrad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060425/4956dc68/attachment.html
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
2006 Jun 04
4
Multiple checkboxes
Please could someone suggest what might be wrong here. In my view I''m 
displaying a series of check boxes and when the form is submitted I want 
the controller to iterate over the values and contatenate them all  into 
a string "1" if the box was checked and "0" if it wasn''t.
I''m new to Ruby and Rails and I can''t seem to get any values out of
2006 Jan 21
5
How do you deal with non-model property form values
I have a User ActiveRecord model that has email and password properties.  I
want to build a login for that has a "remember me" option.  My view looks
like this:
<% @page_title = "Login" -%>
<%= error_messages_for ''user'' %>
<%= form_tag %>
<table>
  <tr>
    <td align="right" width="1%"
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
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.
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
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
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