similar to: Prototype 1.5.0_rc0 form_serialize issues for select lists

Displaying 20 results from an estimated 9000 matches similar to: "Prototype 1.5.0_rc0 form_serialize issues for select lists"

2006 Mar 06
2
form_tag error -- not found, 404 -- action DOES exist!
Hi -- I''ve got a very strange error. I have an action called ''commit_input'' on a controller called ''SiteVisitController''. This definately exists, and is called from the functional test for it, and passes fine. My problem is with the form that is supposed to call this action. The form tag is: <%=
2015 Apr 23
2
cálculo de distancias
¡Hola! Estoy tratando de hacer una matriz que contenga los valores de distancias entre distintos elementos (con sus respectivas coordenadas x e y), pero salta un error, y no sé como corregirlo. ¿alguna idea? muchas gracias! saludos!! Priscila -- Dra. Priscila Ana Powell Instituto de Ecología Regional Facultad de Ciencias Naturales e Instituto Miguel Lillo Universidad Nacional de Tucumán
2005 Dec 05
0
Prototype Form.serialize and mutli selects
Hi, I ran into a problem when using a multi select list in a form submitted through ajax. The name of the select element is something like foo[]. When multiple entries are selected the browser creates form data like foo[]=1&foo[]=2&foo[]=4 (url encoded of course). Rails then creates an array ["1","2","4"] for foo''s entry in the parameter hash.
2010 Oct 19
0
Ajax & Table Display Filtering based on Selected Option
My scenario: On a department''s products page (index.js.rjs), there is a table showing the products with their id, name, category. The view of this table is specified by a partial file called _index.html.erb. I''m going to add in a selection/option drop down menu above the table to show all the product categories. When the user selects a category from the drop down menu, Ajax
2009 Apr 12
3
Multi-button form
It cannot be this difficult, especially in rails. Here is my form code in a partial for the index action of a controller: <% form_tag({:controller => controller_name, :action => ''index''}, {:method => :get, :class => ''form''}) do %> <div class="columns"> <div class="column left"> <p>
2006 Mar 13
0
Controller handling of Non-model fields
I''m a bit confused about how the Controller works for calls that aren''t intended to be remote (non-Ajax). Specifically, if I don''t want to interact with a Model. Does ":action => whatever" always result in a call to the server? Or is it handled like a javascript function (locally, on the client) in the cases where no Model interaction is needed? For
2008 May 30
1
Parameters for FormOptionsHelper select vs. FormTagHelper select_tag
I must be missing something when it comes to the parameter differences between form FormOptionsHelper select and FormTagHelper select_tag. Code that follows, works perfectly - <%= f.select :unit, units_to_select(@product), :size=>"20"%> The following code, does not. The helper function never even seems to be called. <%= select_tag "unit",
2011 May 05
1
Array params in form_tag
Hello i have a lot of time trying to figure this out. I am having problem sending array params with form_tag :remote=>true form.erb <%#= form_tag reporte_client_reports_path do%> <%= form_tag reporte_client_reports_path,:remote=>true do%> <p> <%= label_tag :cuts %> <%= select_tag "cuts[]", options_from_collection_for_select(@cuts,
2010 Dec 22
1
'No route matches' error with select_tag
Rails 3: I have a view books/:id/show.html.erb - in the view, I have a form with a select tag to pick a template, that on dropdown should submit the form which rerenders the page based on the selection: <%= form_tag book_path(@book) do %> > > <%= select_tag "template[]", >> options_for_select([["Template1","template1"], ["Template2",
2006 Apr 07
2
Prototype 1.5.0_rc0 breaks my Form.serialize
Cheers, Prototype 1.5.0_rc0 breaks backwards compatability with this diff in Form.Element.Serializers: http://dev.rubyonrails.org/changeset/4147 I have explicit value="" in my options and now I get the text submitted. E.g. <select id="foo"> <option value="">Please select a value</option> </option value="1">Nr.
2008 Apr 05
2
model select and non-model select_tag
Hello everyone, I''m just trying to understand some logical reasons behind Rails syntax of "select" and "select_tag". I know I can do this: <%= form.select :card_type, supported_card_types, { :prompt => "Please Select..."} %> which sets a model field in the params hash. If I want to do the same for a non-model field,
2006 Jan 19
2
select vs. select_tag
I have a "Users" object and a "Timesheets" object. Each timesheet entry belongs to a User, which is selected from a drop-down list. The timesheet has a user_id field. (The user needs to have an option to select a different user due to the way our system works.) If i use the "select" object, which is bound to the Timesheet model, using this code: &lt;%= select
2008 Jan 18
1
validation - writeback in forms
hallo, i have a form like this: <% form_tag :action => "foo1" <%=select_tag ("user", "name", options_for_select(someArray))%> <%=select_tag ("formdata", "language1", options_for_select(someArray))%> <%=radio_button ("formdata", "language1_level, 3%> <% end> the controller has 2 functions,
2006 Jan 09
7
Large select list, speed issues
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> <font size="-1"><font face="Verdana">I have a piece of code in my page to generate
2006 Jun 24
1
select or select_tag ?
hello PPL, I''ve seen now that the _form.rhtml generated by script/scaffold is populated by <%= text_field ''model'', ''field'' %> without _tag! but only text_field_tag is to be found in the 1.1.2 documentation.. (like in the rest of Module ActionView::Helpers::FormTagHelper there is _tag) I''ve tried to use <%= select instead of
2010 May 04
0
select tag with unique values from db
Hi. I just want to ask some help regarding my simple project. i''m a rails newbie and right now, quite stuck with this. I have this select_tag in my rhtml.. <%= select_tag ''search[outcome]'', options_for_select(["", "qp1", "qp2", "Not Processed"], (params[:search] && params[:search][:outcome])) %> it works fine. But
2008 Jul 14
1
Limit the data displayed in the index view with a select box
Hello, Please be prepared for some very basic, very newbie, very HTML-beginner, knows-nothing-about-AJAX questions... I have a (RESTful, if it makes any difference) application that displays a ton of data (names of documents) on the index page. I would like to limit the amount of data displayed, by adding a SELECT box that narrows the list of data down by selecting a category. Each category has
2008 Apr 24
2
select_tag and link_to
Does ROR allow passing the chosen value from a drop down using select_tag into link_to ? Basically I want to do something like: <%= select_tag( "name", options_for_select(%w{John Doe Jane })) %> <%= link_to "Delete", { :controller => "myname", :action => "add", :id => name },
2007 May 11
5
options_for_select - how to set the selected value?
Ok, this should be simple but I am finding it''s not and previous postings don''t seem to shed too much light on this. I have a select_tag with 4 values pulled in via a helper: def filter_hours filter_hours = [ ["1 hour", 1], ["24 hours", 24], ["7 days", 168], ["14 days", 336], ] end The select_tag looks
2008 Jul 20
1
selected attribute in options_for_select
Hello Everyone I have a select_tag which I populate using a map, I use options_for_select method to pass the map and "selected" value. For some reason I can not get the option "selected" based on the value I pass to the selected attribute. Here is the code <%= select_tag :current_course, options_for_select( Course.find(:all).map {|p| [p.title,p.id]}, @selected )