similar to: select box with multiple rows

Displaying 20 results from an estimated 2000 matches similar to: "select box with multiple rows"

2006 Aug 16
1
how to update a collection_select from another
I have two collection_select in my list.rhtml: <%= collection_select (:region, :id, @regionall, :id, :title,html_options={:onChange => "new Ajax.Updater(''related_provinces'',''/categories/related_provinces/" + "?id=''+this[this.selectedIndex].value, {asynchronous:true, evalScripts:true});"}) %><br> <%= render :partial =>
2009 Jan 28
3
Apply style in collection_select ?????
Hi to all, i have this snip i want to apply style to this combo but there is no effect help....... <%= collection_select(:customer,:country_id, @countries,:id, :country, html_options={ "style" => "width:110px" },:onchange => ''updateState('''');'',:id =>''country_id'' )%> Thanks, -- Posted via
2009 Jan 08
4
Problem with disable_with
Hi Group, I have a registration.html.erb page with the following JavaScript at the top which I use to validate form fields: <script type="text/javascript"> <!-- function validate(){ if ((document.myForm.email_projectname.value=="")|| (document.myForm.email_projecttype_id.selectedIndex<1)|| (document.myForm.email_region_id.selectedIndex<1)) { alert
2006 Mar 07
6
how to add onchange javascript event to select field
I would like to add javascript ''onChange'' event handling for a select field, such as <%= collection_select("job", "client_id" , @clients, "id", "name") %> with onChange="xxx" Anyone know how to make this work? Thank you, Scott -- Posted via http://www.ruby-forum.com/.
2006 Aug 17
1
2 newbie question
Hey all, I have 2 newbie questions, 1st question: <%= collection_select (:region, :id, @regionall, :id, :title,options={:prompt=>"- Select cat -"}) %> Ignores the :prompt part while options={:include_blank => true} works. Any idea what I?m doing work with :prompt ? 2nd question: How can make my collection_selected to display it''s third key by default? I know it has
2005 Jan 25
4
Collection_select with multiple options
Hi, I have built a select field that allows multiple options selected with collection_select and "multiple"=>"multiple". How do I go about receiving the values? If I use a variable name like collection[], it complains that I can''t use @collection[] as the instance variable. TIA victor
2006 Jun 22
2
Setting an index on a collection_select
I am creating a data entry form that allows a user to fill in multiple rows and save them all at once. In my controller, I create an array of "person" objects and pass it to the page. On the page, I have a text field like so: <%= text_field "person", "name", "index" => 1 %> Note the "index" attribute, which sets the name and id
2006 Apr 24
4
creating a select box
Hi trying to create a select box in _form.rhtml. I have a table called organisations that contains fileds, 2 being ''id'' and ''name'' these are the fields I need to bring over to the clients _form.rhtml. whats the best way of going about that?? 2 ways i have seen suggested that I cant get to work -@organisations = Organisation.find_all placed this in def new
2006 Jun 09
0
options vs. html options in collection_select
I wanting to add an onchange event handler to collection_select but I''m not sure how. The api gives the signature as collection_select(object, method, collection, value_method, text_method, options = {}, html_options = {}) I''m not sure, however, if I need to place the desired code in "options" or "html_options". I''m sure I could just figure it out
2005 Dec 18
3
getpeername failed
Fellows, I need some help regarding this thing!1! I get tons of messages like this ? Can anyone help me with resolving this problem ? Dec 18 13:52:42 constellation smbd[8063]: [2005/12/18 13:52:42, 0] lib/util_sock.c:send_smb(647) Dec 18 13:52:42 constellation smbd[8063]: Error writing 4 bytes to client. -1. (Connection reset by peer) Dec 18 14:00:01 constellation crond(pam_unix)[8126]: session
2006 Jun 01
3
html_options and select()
I am trying to add html_options to select(): <%=select(:user, :id,[[''me'',1],[''myself'',2],[''and I'',3]], :select => {},:html_options => {"size" => 5, "multiple" => true})%> This does not work... How do I get the html_options to work? ActionView::Helpers::FormOptionsHelper -- Posted via
2006 Jul 08
10
A rant about parameters
Guys, I''ve been chasing a problem with country_select for the past few hours now. My intention was pretty simple...use the following line in a form: <p><label for="country_region">Country</label> <%= f.country_select :country_region, "United States" %></p> However, for the life of me, I couldn''t get it to work. I kept getting
2010 Oct 06
4
List of html_options available
I''ve noticed lots of people online complain about not good documentation for Rails. I''m a PHP programmer but I''m a newbie on Rails. I''m creating a form with a drop-down menu. I finally got to do it. I noticed there is a html_options parameter for select. I was curious as to what other html_options are available but couldn''t find a list of options. I
2007 May 28
2
helper with block compile error
HI, i''m trying to write a helper that replaces link_to_remote that accepts a block but it gets a compile error in the template: I don''t know what I''m doing wrong... TIA # application_helper.rb def link_block_to_remote( options = {}, html_options = {}, &block) concat(link_to_remote(capture(&block), options, html_options), block.binding) end # in
2009 Sep 02
8
select_month helper
I''m trying to rewrite a fusebox-like application (Active4D plugin to 4D database) in RoR/postgres and I''m doing okay - but keep running into things that stump me. It seems like it takes me hours to figure out something that I could have written in pure code in minutes. The select_month and select_day helper has been my latest waste of time. All I''m trying to do is add
2006 Oct 14
2
Documentation for html_options = {}
Hi, trying to locate documentation for html_options = {} as allowed in RJS calls such as link_to_remote. Can anyone point me in the right direction please? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2005 Mar 24
5
Using html_options with link_to_remote??
Why doesn''t this output class="delete" into my html? <%= link_to_remote image_tag("delete"), :update => "relationship_" + @relationship.id.to_s, :url => { :controller => "relationships", :action => "destroy", :id => @relationship.id }, :html_options => {:class => "delete"} %> Regards, Ben
2008 Jun 26
2
Problem with date_select after Rails 2.1 upgrade
Folks, I think I should start a new thread for this, because a similar one I saw is a bit old and the resolution there doesn''t seem to apply to what I''m running into now. Anyway, my date_select calls are bombing on me with the exception: ---- ActionView::TemplateError (wrong number of arguments (3 for 2)) on line #8 of entries/_dates_form.haml: 8: = date_select(
2007 Dec 02
4
select and passing some javascript
Hello, After reading and reading the documentation, I can''t append some javascript function into a select. It''s not possible ? documentation: ------------------------------------------------------------- select(object, method, choices, options = {}, html_options = {}) some code: ------------------------------------------------------------- return select(:id, :year, [
2006 Dec 10
1
how to add a class to country_select field
<%=country_select ''user'', ''country''%> I have the above field, how can I add a class to this? The api says this, if someone could explain how to get to the html_options bit, without the others, that would be great? country_select(object, method, priority_countries = nil, options = {}, html_options = {}) -- Posted via http://www.ruby-forum.com/.