similar to: form_tag - directing to new target window

Displaying 20 results from an estimated 5000 matches similar to: "form_tag - directing to new target window"

2006 Feb 23
4
looping
I have a form that prints fine for one particular criteria... facility_id = "X" controller code looks like this... def fac_log @facility = Facility.find(params[:report][:facility_id]) @placement = Placement.find(:all, :conditions => [ "facility_id = ? and discharge_date IS NULL, params[:report][:facility_id] ] ) end I can print out the form
2006 Feb 28
2
sorting collection lists
I''m using collection.select lists and I would love to sort them by one or two of the columns as the lists are getting long enough to make a difference. <%= options = [[''Select a Facility'', '''']] + @facility.collect { |fac| [fac.name, fac.id] } select ''placement'', ''facility_id'', options %>
2007 Apr 20
1
Problem with form_tag
Hi all! I''ve seen this problem in several places in the list, but none of the remedies suggested seem to be helping me much. I have a view like so: HELLO <% form_tag :action => "create" do %> <p>My pretty form!</p> <p><%= text_field "foo", "bar" %></p> <p><%= submit_tag "Do
2006 Mar 21
4
Using onSubmit tag in form_tag?
Hi guys, I have been working on a form that would use javascript to validate the data before submitting it, and from my view.rhtml I have a statement like this: However such a statement generates a HTML tag that looks like this: <form action="/users/Login?onSubmit=validate%28%29" method="post"> Seems like Rails thinks it is a parameter instead of an option, so
2006 Apr 08
2
Add id to form_tag?
Hi all, What is the correct syntax to add an id attribute to a form tag with the "form_tag" helper? I''ve tried start_form_tag({:controller => ''houses'', :action => ''find''}, {:method => :get, :id => ''search''}) start_form_tag({:controller => ''houses'', :action =>
2006 Mar 23
2
newbie - form_tag with get?
I can''t create a form with method "get". The rhtml code: <%= form_tag :controller => ''teritory'', :action => ''add'', :method => ''get'' %> The generated html code: <form action="/teritory/add?method=get" method="post"> What i''m doing wrong? -- They say money can''t
2006 Jan 20
1
form_tag and multiple buttons inside problem
Hi, I have a bit of a problem with a form in rails. Well, the problem really is me not fully understanding the mechanism of the form_tag, so here''s what i try to do: The idea is to present a some edit fields for some @product attributes and then present a table showing the @product.pieces (pieces for every @product) and to include a "Edit Piece" and "Delete Piece"
2006 May 18
6
Form actions with additional parameters
Hiall, I want to give the action of a form an additional parameters but can''t figure out how to do it. My code looks like this <%= start_form_tag :action => ''create'', next_step => true %> <%= render :partial => ''user_form'' %> <%= render :partial => ''community_form'' %> <%= submit_tag
2006 May 14
3
need help for simple form tag (noob)
when the user click on "Search" I would like it to point to http://curentpage/?filter=searchtext (the filtering code is already written) it would look like this: <%= start_form_tag(url_for_options = {<something>}) %> <%=text_field (<my_filter>) %> <%= submit_tag(value = "Search")%> any idea how to do this? thanx in advance
2006 Jan 23
4
ActionRecord: how to update many records in one statement
Hello, I am trying to edit and update all records of table ?intersts? (id, name, description) on one page and has no good idea how to do it right, when updating one record per page it?s ok The question is: what statement instead Interest.update_all(params[:interest]) in controller need to use to successfully update the database table by data passing to controller in parameter ?interest??
2006 Jun 01
9
Image upload
ok, im done, the plugins file_column and acts_as_attachment doesnt seems to work for me, i want a simple thing, upload images, resize it to 216px width, save its filename to a table and save the file to the /public/images directory, i have searched a lot but all the examples are too complex, im starting with rails. If someone can post a example code for the view, controller and model(if any)
2006 Apr 05
25
How to avoid bunch of <% %> ??
Hello, I would like to know is there is a way to avoid poluting the views with tons of <% %> ? Like this <%= start_form_tag() %> <%= text_field_tag(''category[title]'', category.title, {:size => 20, :maxlength => 128}) %> <% if not category.parent_id.nil? %> <%= select("category", "parent_id", Category.find(:all,
2006 Mar 06
2
Computer Inventory: Problems Retaining Values in a Forms
This is my first rails app and I am creating a Computer Inventory system as practice. The problem I am having seems trivial, but I can not figure out what exactly is going wrong, so this is where help from those of you who are more experienced is needed. I am having problems retaining the values in some of my forms. Everything works fine when I am creating or editing a Computer in the inventory
2006 Mar 07
0
API Suggestion
It''s not intuitive to have two hashes on any one method call. Most of the view helpers have a hash for method options followed by a hash for html options. I find it to be problematic at best. I think it would be best to have one hash and then add your html options as a hash entry. For example: <%= link_to "All Facilities", {:action =>
2006 May 04
4
form post not working
Hi there, I have this form code in a view: <%= start_form_tag :action => "listByArtist", :id => artist.id %> <p><b>List by Artist:</b> <select id="artist_id" name="artists[id]"> <%= options_from_collection_for_select(@artists, "id", "name") %> </select> <%= submit_tag "List"
2006 Aug 02
3
Upload forms--where is the file object?
Hi All, I''ve been trying to create an upload form page that will take an uploaded file, and save it to a directory on the server. I''ve tried following a couple of posts on this list, and the HowTo from here: http://wiki.rubyonrails.org/rails/pages/HowtoUploadFiles Here is the code in my view: <%= start_form_tag ( {:action => "upload"}, { :mulipart => true }
2006 Jan 04
4
HOWTO: Render partial in div
Hey- I''m using ROR 1.0 and script.aculo.us 1.5.1. I''ve been trying unsuccessfully to render a partial in a DIV, but can''t seem to get the right combination of stuff to make it work. There seems to be a few different ways of going about it. Right now I can render a partial. What do I need to to render the partial in a div? Here is what it looks like so far: #
2007 Jan 18
7
form_tag broken in Rails 1.2 RC2 or is it me?
I''m using Rails 1.2 RC2 and I''ve got a view that uses form_tag and the form is not being rendered. It''s just not there. My view is this: <div class="box"> <fieldset> <legend>Log in</legend> <% form_tag do %> <div class="row"> <div class="formfield"> <label
2006 Jul 03
2
Still struggling with data flow ...
Hello, The following view: <%= start_form_tag %> Enter term to find <p> <%= text_field_tag :name, params[:name] %> </p> <%= link_to "Find", { :action => ''find_term''} %> <%= end_form_tag %> does not appear to pass back the value of :name to the action: def find_term term =
2006 Aug 06
6
View passing empty or no value to controller -- help
Hi, I have the following view: <%= start_form_tag ( { :action => ''find'' }, :method => ''get'') %> <p> <%= text_field_tag :lemma, params[:lemma] %> </p> <%= link_to "Find It", :class => "submit" %> <%= end_form_tag %> And the following find action in the controller: