Displaying 20 results from an estimated 7000 matches similar to: "multiple options & checkboxes"
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
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][]",
2008 Dec 09
4
HABTM checkboxes insert but don't delete
I have a problem related with the HABTM relationships with checkboxes.
I''ve got a profile and a service model, both related with
has_and_belongs_to_many.
The problem is that i can insert new data in the profiles_services
table, however, i cant delete already existing data.
What could be the problem?
--~--~---------~--~----~------------~-------~--~----~
You received this message
2006 Feb 22
8
filtering "tags" via checkboxes - HABTM
First post/newbie post... bear with me.
What I''m trying to achive (music site):
A system containing tracks and moods with a HABTM relationship. I''ve
got all that set up and functioning in the admin environment - i.e.
admins can apply a variety of moods to a particular track via a
series of checkboxes. Join table works just fine.
I''m currently stuck on allowing
2006 Apr 26
2
HABTM with ajax_scaffold
has anyone managed to do this? It works great for has_one, belongs_to type
stuff, but i cant seem to get a HABTM setup going. Any demo code or advice
greatly appreciated.
Excellent work on this tool by the way its really great work.
adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
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" value="1" />
But readonly doesn''t work ???
--
Posted
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
2013 May 27
3
Ransack, acts-as-taggable-on and checkboxes in search form
need some help on ransack filtering.
I have model Project, which has many tags through acts_as_taggable gem.
Project.rb:
class Project < ActiveRecord::Base
include PublicActivity::Common
belongs_to :customer
belongs_to :category
has_many :attachments, :as => :attachable
has_many :reports, :dependent => :destroy
has_many :messages, :dependent
2007 Mar 18
7
How to get more informations about an association at runtime
Hi all
I''m working on a Custom Formbuilder. I want it to create me with a
single method call checkboxes for a given HABTM association.
My model looks like this:
[code=ruby]class Member < ActiveRecord::Base
has_and_belongs_to_many :preferred_music_styles,
:class_name => ''MusicStyle'',
:join_table =>
2006 Aug 27
3
n-to-m relationships in Forms
Hi,
I can''t understand the RoR-API concerning certain form helpers. Can you
maybe help me?
I have a model, Film, with a habtm-relationship to the model Language.
Now if I want to have a form for editing/creating a Film, I''d like to
have checkboxes for each Language with those checked that are associated
with the Film in question.
Is there an "easy" way to do this
2005 Nov 30
2
Missing scaffold features
Hello everyone,
First off, I''m trying to generate a discussion here, not provoke an
argument or get people upset. Please bear this in mind if/as you read
on...
To my mind, there''s 3 missing features from scaffolds that would make
them a whole lot more useful. These are:
- auto-generation of a drop-down list for inputting/updating
has_many/belongs_to relationships between
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
2008 Mar 02
2
check_box_tag remote_function
I have a collection of check_box_tags that look like the following:
<% for item in @items %>
<%= check_box_tag "item[item_ids][]", item.id, false, {:onchange =>
remote_function(:url => update_items_path, :with => "''items='' +
escape(value) "} %>
<%= item.name %>
<% end %>
My question is, how do I send all of the current
2006 Aug 07
2
Getting an array of ids from form checkboxes?
Is it possible to set up a list of checkboxes so that the form
parameters are given in an array (eg {"delete_list" => [3,6,7]}) ?
At the moment I''m using
<%= check_box_tag "delete_list[#{post.id}]" %>
...which gives parameters looking like {"delete_list" => {"3" => "1",
"6" => "1",
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
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 Dec 27
0
HABTM Checkboxes - Adding/Updating Users to a Project
Hello all,
I''m trying to create a HABTM checkbox action that adds/updates ''users''
to a ''project''.
I have the following laid out.
---------------------
TABLES
---------------------
create_table "assignments", :id => false, :force => true do |t|
t.column "project_id", :integer, :default => 0, :null => false
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 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
2011 Oct 21
20
How to transform my html form into a rails 3 form
Hi,
I have the following code working in a rails 3 view, but it is
unfortunately not pure rails code!
<% @filter1 = "tr.show1,tr.show2" %>
<% @filter2 = "tr.show1" %>
<% @filter3 = "tr.show2" %>
<form>
<p>
<input type="checkbox" value=<%=@filter1%> onclick="$
(this).is('':checked'')