Displaying 20 results from an estimated 3000 matches similar to: "2nd Submit button with options"
2006 Jun 16
2
image_select_tag with name and value
What have I missed
I have a .rhtml with the sandard form parameters
<%= image_submit_tag("excel.gif", :alt => "Download List to Excel",
:border => 0, :name => ''render_action'', :value => ''excel'' ) %>
Which genenerates I believe a valid html fragment for a submit button.
<input alt="Download List to Excel"
2006 Jun 19
0
Bug? With image_select_tag processing in controller?
As I wrote in http://www.ruby-forum.com/topic/69600
A) I created a .rhtml
<%= image_submit_tag("excel.gif", :alt => "Download List to Excel",
:border => 0, :name => ''render_action'', :value => ''excel'' ) %>
B) This rendered the valid html
<input alt="Download List to Excel" border="0"
2006 Aug 18
1
join update seperation?
I have a legacy DB without access to change the user or group table
(must use StoredProcedures to edit those). But I do have access to the
usergroup join so I thought the joins would be pretty much like my other
rails apps where I do HABTM checkboxes. I''ve created a page that just
shows habtm checkboxes for the join and the updates are occuring for the
join but I''m
2008 Jul 23
0
Link_to_remote object missing
Hello, I''m in troubles trying to use ''link_to_remote'' on Rails 2.1.
Having this page:
<h4>Editing project</h4>
<% form_for(:project, :url => project_path(@project), :html =>
{ :method => :put }) do |f| %>
<p>
Name <%= f.text_field :name %>
Date <%= calendar_date_select :project, :target_date, :time =>
2006 Apr 21
4
link_to_function with submit
I looked everywhere but couldn''t find it.
I don''t want a submit_tag or image_submit_tag but a normal link that
submits my form.
Normally I would do this with a javascript like
function sendForm ()
{
document.forms[0].submit();
}
but this doesn''t work with form_remote_tag
link_to_function( ''Send'' , "sendform();")
So the question is:
2006 Apr 18
1
''wrong number of arguments'' for text_field?
This is probably something very simple but I can''t seem to figure out
why I keep getting the ''wrong number of arguments (1 for 2)'' error with
the following code when I try to create a new record. If anyone can see
what is going wrong here please help!
new.rhtml
-------------------------------------------------
...
<%= start_form_tag :action =>
2007 Oct 15
6
Form with two buttons
Hi,
I need to make a form with two buttons. But I do wrong. And why not can
be.
form:
-------------------------------
<%= form_tag :controller => ''establishment_contents'', :action =>
''llamada'', :opMenu => opcionMenu %>
[...]
<%= image_submit_tag ("../images/incluir.gif", :op=>"addImage") %>
[...]
<%=
2010 Mar 09
9
Ajax-submit form on "check box onclick ": why this error?
Hi there,
I need to have a checkbox which ajax-submits a form.
The following code throws an error "index 112009 out of string". What''s
wrong here?
==============================================
<% form_remote_tag :url => { whatever_url } do -%>
<%= check_box_tag ''whatever'', nil, whatever, { :onclick =>
2007 Sep 12
0
image_submit_tag, :get method and x&y issue
For search functionality I am using :get method to post the form. I am also
using image_submit_tag.
<%= form_tag({:action => ''search''},{:method => :get}) %>
<label>Search:</label>
<%= text_field_tag ''term'' %>
<%= image_submit_tag "search.png",:name =>
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
2005 Sep 19
1
help with has_one relationship??
Hi
I''m new to Rails and I''m struggling with a ''has-one'' relationship. I''m
trying to save product and image data in seperate tables with one to one
relationship. I''m assuming the problem lies in the controller method
below but can''t work it out. The models contain the has_one and belongs
to statements, and I tried swapping these
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/.
2007 Mar 06
1
link_to, image_submit_tag, "changes only with POST" and "usability without Javascript" question
Hello,
I want to have the following features in my rails application:
1. the program should have AJAX if Javascript available
2. I want to protect my application described in
http://www.w3.org/2001/tag/doc/whenToUseGet.html - means GET should be
safe
3. if Javascript is disabled the application should work too (without
AJAX)
If I use "GET should be safe" option (verify) and link_to
2006 Jan 15
4
form inputs resetting on sumbit
I searched for forum for something about this but couldn''t find
anything.
For example I have this in my view: (you enter start/end dates from
dropdowns, pick a category and a report is generated.)
<%= start_form_tag :action => ''display_report'' %>
From: <%= date_select ''report'', ''date1'' %> <br />
To: <%=
2006 Mar 24
2
check_box_tag
hi,
What''s the right way to use the CHECK_BOX_TAG?
I used:
<% for @pippo in @model %>
<%= check_box_tag (:scelta,@pippo) %>
<% end %>
How Can I control if a person choosen the second or third element of the
vector @pippo?
--
Posted via http://www.ruby-forum.com/.
2008 May 10
0
can javascript handle 422 response
I''m toggling a check box via ajax using:
application_helper.rb: ...............................................................
def toggle_value(object)
remote_function(:url => url_for(object),
:method => :put,
:before => "Element.show(''spinner-
#{object.id}'')",
:complete
2007 Sep 15
3
check_box_tag always checked
#check_box and #check_box_tag are going to be the end of me. Why is
this always checked?
<% checked = @reservation.selected ? ''checked'' : nil %>
<td><%= check_box_tag("reservation[" + @reservation.id.to_s +
"][selected]", ''checked'', :checked => checked) %></td>
2006 Jul 13
1
error_messages_for
I can''t seem to figure out how to validate a few fields some1 please
help me out
model---------
class Record < ActiveRecord::Base
validates_presence_of :sw, :flex
end
controller------------
class RecordController < A;;icationController
def new
@record = Rrecord.new
@product = Product.find(params[''product_id''])
end
def create
2006 Mar 27
0
how the check_box_tag works?
I don''t understand the right functionally of the Check_box_tag!.
def check_box_tag(name, value = "1", checked = false, options = {})
can i put as value, the attribute names of a my model?
I would select some model attribute to work.
--
Posted via http://www.ruby-forum.com/.
2006 Jul 05
0
Javascript repeating fields.
The one area I keep hitting my head against in Rails is repeating fields via
javascript. I frequently have forms where one or more fields are actually
broken out into sub tables because there can be multiple simultaneous values.
Rails seems to want to you to use the [] construct in the form helpers (e.g.
text_field(''employee[]'', ''name'')), but I can''t