search for: end_form_tag

Displaying 20 results from an estimated 404 matches for "end_form_tag".

2007 Jan 28
3
end_form_tag not generating </form>
I put the following code at the end of my index.rhtml: <%= form_tag :action => ''reverse'' %> <%= end_form_tag %> and I get the following code generated: <form method="post" action="/chapter3/reverse"/> </body> ... no </form> tag I''ve checked in ActionView::Helpers::FormTagHelper and the "end_form_tag" seems to be defined properly. Any su...
2007 Apr 03
3
end_form_tag
In my logs I can see that end_form_tag is being deprecated. I wanted to make the switch now but cannot get the new end tag to work. THIS WORKS: <%= form_remote_tag :url =>{:action => "next_question", :kwiz_id => @kwiz.id, :position => @next_p...
2006 Apr 05
25
How to avoid bunch of <% %> ??
...quot;, category.id] ).collect {|c| [ c.title, c.id ] }, :selected => (category.parent_id.nil? ? "" : category.parent.id)) %> <% end %> <%= submit_tag "Enregistrer" %> <%= link_to "Annuler", :action => "list" %> <%= end_form_tag() %> Obviously this is not very clean. I find it hard to read and having to type so many times the same symbols is tedious Thanks -- Posted via http://www.ruby-forum.com/.
2006 Mar 09
7
how to make two forms on the same page???
I can get the forms to be displayed, but i want to have only one "create" button. i''ve tried everything i can think of... -- Posted via http://www.ruby-forum.com/.
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 May 18
6
Form actions with additional parameters
...<%= start_form_tag :action => ''create'', next_step => true %> <%= render :partial => ''user_form'' %> <%= render :partial => ''community_form'' %> <%= submit_tag "Optional Next Step" %> <%= end_form_tag %> <%= button_to ''Skip Next Step'', :action => ''create'', next_step => false %> The form_tag should demonstrate what I intend to do. In the corresponding ''create'' action of my controller, I want to redirect_to different locations...
2006 Jun 04
4
Multiple checkboxes
...= @question.title %></h3> </br> <% for option in @options %> <input type="checkbox" name="option[]" value="<%=option.id%>"><%= option.option_text %></br> <% end %> </br> <%= submit_tag%> <%= end_form_tag%> Controller: def save_question @options = Option.find_all_by_question_id(session[:question_id]) response = "" for option in @options do if params[:option][option.id]=="1" response << "1" else response << "0" end end...
2006 Aug 17
6
Rails and Checkboxes
...he 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: <%= start_form_tag :action => "pick_your_own" %> Anchovies <%= check_box "pizza", "anchovies" %> <% end_form_tag %> Controller: @total = 0 if @pizza.anchovies? > 0 then @total = @total + 10 end This gives me a NoMethodError with "You have a nil object when ou didn''t expect it. This error occured when evaluating nil.anchovies?" Also note, I''m not trying to enter...
2006 Jun 30
4
Serious noob question. Any help would be great
...rt_call = SupportCall.find(params[:id]) end def find end ##find.rhtml <html> <body> <%= start_form_tag :action => "edit", :id => params[:id] %> <%= text_field "support_call", "id" %> <%= submit_tag "Find It!" %> <%= end_form_tag %> </body> </html> -- Posted via http://www.ruby-forum.com/.
2006 Jul 02
6
remote form w/ evalScripts:true
...'List'' %> Which list? <%= select ''list_item_link'', ''list_item_id'', @lists.collect{ |l| [ l.name, l.id] }, { :include_blank => true}, { :class => "formfield", :onchange => "this.form.submit()" } %> <%= end_form_tag %> And here is the code in the template that actually works (using a GET instead): Which list? <%= select ''list_item_link'', ''list_item_id'', @lists.collect{ |l| [ l.name, l.id] }, { :include_blank => true}, { :class => "formfield&quot...
2006 May 06
5
form_remote_tag not posting data
...;><%= text_field_tag ''name'' %></td> <td size=''200''><%= text_field_tag ''email'' %></td> <td id=''submit''><%= submit_tag ''icon_additem.gif'' %></td> <%= end_form_tag %> For whatever reason this is not submitting any of my params... The log shows no params being sent. Env is OSX 10.4 + Lighttpd + Safari/Firefox/Camino. Any clue what is wrong?? I''m trying to do a demo in 30min without any luck. Thanks. Josh
2006 Apr 22
3
Creating a select dropdown box with links to methods
...rong>Select a View:</strong> <select id="selection" name="selection"> <option value="choice1">Choice 1</option> <option value="choice2">Choice 2</option> </select> <%= submit_tag("View") %> <%= end_form_tag %> Then I have a methond in my controller that based on the selct box selection, redirects to a different method/view: def select_view # Depending on the selection, redirect to a certain view. if params[:selection] = ''choice1'' redirect_to(:action => '&...
2006 Apr 29
11
Multiple actions from one form - possible?
...t; ''save'', :action2 => ''saveandsend'', :id => @letter %> <%= submit_tag ''Save'', action1 %> <%= submit_tag ''Send'', action2 ''%> <%= render :partial => ''form'' %> <%= end_form_tag %> -- Posted via http://www.ruby-forum.com/.
2006 Mar 05
1
Help with Self-Referential HABTM
...ds <%#= hidden_field(''type'', ''subtype_id'', "value" => @subtype.id) %> <%= hidden_field(''subtypes'', ''id'', "value" => @subtype.id) %> <%= submit_tag ''Create'' %> <%= end_form_tag %> In the controller I''ve got: def createsubtype @type = Type.new(params[:type]) @type.subtypes = Subtype.find(params[:subtype_id]) #THIS LINE IS THE PROB if @type.save flash[:notice] = ''Type was successfully created.'' redirect_to :action =&g...
2006 Aug 09
2
how to access selected value in controller action
..._tag :action => ''create_price'', :id => @media.id %> <%= select("media", "price_code_id", PriceCode.find_all.collect {|pc| [pc.name, pc.id ] }, { :include_blank => false }) %> <%= submit_tag ''Add Price Code'' %> <%= end_form_tag %> My question is, how would I access the selected value in the create_price action in the media controller? -- Posted via http://www.ruby-forum.com/.
2006 May 12
0
RJS, Safari, Error - DOM exception 7
...t_form'' } %> <fieldset> <span class="label">New recipient:</span><br/> <%= text_field :email, :address %><br/> <%= submit_tag ''Add'' %> </fieldset> <%= end_form_tag %> <%= form_remote_tag :url => { :action => :send_message }, :html => { :id => ''message_form'' } %> <fieldset> <span class="label">Secret Message:</span><br/>...
2006 Apr 16
2
AJAX update of <img> element?
...JAX updates of an <img> element, but I can''t seem to make it work. Should it be possible to do something like this...? [View] <%= form_remote_tag :url => {:action => ''sendplot''}, :update => ''plot'' %> <%= submit_tag %> <%= end_form_tag %> <img id="plot" src="someimage.png"/> [Controller] def sendplot output_plot(...) # this sends a png file to the browser - this bit works end I find that the browser (Opera or Firefox), no matter what, won''t :update an existing <img> tag. If I :update...
2007 Jun 07
6
Can't download files with send_data or send_file
...ata comes up in that div, but otherwise I can''t get the browser to acknowledge the sent file. >From view: <%= form_remote_tag :url => {:action => "csv_dump" }%> <%= submit_tag "Download Complete List" ,:name => "csv"%> <%= end_form_tag %> >From controller: def csv_dump @assignments = Assignment.find(:all) report = StringIO.new CSV::Writer.generate(report, '','') do |csv| csv << [''ID'', ''ExpoCode'',''Project'', ''Cur...
2006 Jan 13
2
Change Password with acts_as_authenticated
...gt; "update_password", :id => @user.id %> <%= password_field ("user", "password", :size => 20) %> <%= password_field ("user", "password_confirmation", :size => 20) %> <%= submit_tag "Change Password" %> <%= end_form_tag %> In My Controller: ############################### def update_password return unless request.post? @user = User.find(params[:id]) if @user.update_attributes(params[:user]) flash[:notice] = ''User password was successfully updated.'' redirect_to :action => '...
2006 May 19
4
why no multiple submit?
is it by design? is it standard? how do you give users multiple actions on a form? -- Posted via http://www.ruby-forum.com/.