Displaying 20 results from an estimated 800 matches similar to: "Create CheckBox"
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 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
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 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 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 Nov 23
5
ActiveRecord not getting true value from checkbox
I have a checkbox tag as follows:
<%= f.check_box :receive_offers %>
When I view source in the html, I see the value of the checkbox is "1",
with the normal hidden field value of "0". However, after posting the
form and saving to the database, the Mysql column, which is a TinyInt,
is ALWAYS 0.
I''ve tried it with true/false values instead, and no luck.
Any
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 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 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 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 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:
<%=
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 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
2008 Aug 05
6
Installing Xen
Hi,
I am trying to install xen-3.2.0 , but its failing.
The rpms used for installing are
1. xen-3.2.0-0xs.fc8.i386.rpm
2. xen-3.2.0-0xs.fc8.src.rpm
3. xen-debuginfo-3.2.0-0xs.fc8.i386.rpm
4. xen-devel-3.2.0-0xs.fc8.i386.rpm
5. xen-libs-3.2.0-0xs.fc8.i386
when I tried installilng the first rpm
rpm -ivh /home/devi/Desktop/xen-3.2.0-0xs.fc8.i386.rpm
it gave an failed dependencies
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 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,
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
2008 Sep 22
4
Process ids
Hi all,
I want to check the status of resources of virtual machine, created using
Xen.
I have written a script, which checks the status of the virtual machines and
does all the actions like,
start, stop, status, monitor.
so, I want to check the status of the resource of virtual machines.
I have thought of it and have 3 ideas. I want your suggestions.
1. Since we will know the process id of
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 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