Displaying 20 results from an estimated 9000 matches similar to: "link instead of submit_tag?"
2007 Sep 04
2
How can i add a confirmation dialog to a submit_tag?
When i use button_to or link_to, i can easily request a confirmation
dialog with (for example)
<%= button_to "Delete this story",
{ :controller => "story", :action => "delete", :id => @story.id },
:confirm => "Delete story: are you sure?" %>
I also want to do this for the submit buttons on my forms, which are
2009 Apr 19
1
Overriding html generated for submit_tag and selected links
Hi,
Probably something simple, but I''m trying to change my submit_tag and
other buttons to CSS based buttons based on the article at
http://www.oscaralexander.com/tutorials/how-to-make-sexy-buttons-with-css.html
Basically this needs the following HTML markup:
<a class="button" href="#"><span>Button Text</span></a>
So, the question is how can
2006 May 22
2
Submit_tag question
Can I pass additional parameters when using a submit_tag?
Is this legal?
<%= submit_tag ''Save'' , { :editfacility => params["editfacility"] }
%>
When I do this, the "editfacility" parameter is always lost. I have a
feeling I''m missing something basic...
Thanks,
Marcus
-------------- next part --------------
An HTML attachment was
2009 Oct 19
1
submit_tag or f.submit
Hello all,
I am pretty much new here, trying to move to RoR from .net world.
I will appreciate if anyone clarifies this for me.
Most of books use "submit_tag" in new or edit views, but I see Rails API
web documents use "f.submit" instead. I also see Agile Web Development
using RoR 3rd Edition use the same "f.submit" instead of "submit_tag."
Which way is
2009 May 24
1
is f.submit in a form_for newer than submit_tag?
some books or even the rails api uses
form_for ...
...
submit_tag ...
end
and i found that the Rails 2.3.2 Scaffold uses
f.submit "Go"
instead... and this is not in the rails api doc. Is this a new
addition and is it suppose to replace submit_tag?
--
Posted via http://www.ruby-forum.com/.
2010 Jan 20
5
disable submit_tag after click
This code disables the ''Save'' button once clicked, but doesn''t seem to
send the form data.
<%= submit_tag ''Save'', :class => ''submit'', :onclick =>
"document.getElementById(''save_button'').disabled=true;", :id =>
"save_button" %>
This code sends the form data and a record is created,
2006 Jul 14
3
Rails newbie: How does the submit_tag work?
I would appreciate any and all input. The Agile book is not useful in
this context. :o(
As near as I can tell, it doesn''t work at all.
I would expect that clicking on the [Next Question] button in the
browser would fire the next_question method in the current controller.
Instead, it (apparently) does nothing.
The tag in question
<%= submit_tag ''Next
2006 Feb 27
2
submit_tag
How can i use the submit_tag method (from: actionView::FormTagHelper)
to create various submit buttons and chose the right action in accord to
the button that i pushed?
--
Posted via http://www.ruby-forum.com/.
2007 Jun 26
3
what is the :or parameter in a submit_tag ?
I read the following tag in teh Beast example
<%= submit_tag''Login'', :or => link_to_function(''forgotten password'',
"$(''reset-password'').toggle();") %>
I understand the link_to_function, but what is this :or parameter used
for ?
the link doesn''t appear, so it cannot be used...
thanks for your lights
kad
--
2008 Jul 14
1
will_paginate paginates all instead of subclass
I''m still a newb but having fun - Any help on this problem will be
much appreciated.
I have mymodel Call.rb
class Call < ActiveRecord::Base
belongs_to :user
has_many:visits, :dependent => :destroy
has_many:visits do
def latest
find :all, :order => ''id DESC'', :limit => 3
end
def all_latest
find
2005 Aug 15
2
Newbie rendering problem
Hi
On every list request i render an item partial through a collection of
items. the item table has 3 columns namely name,anotherName and id. the
item partial looks like
<%@item=item%>
<%= error_messages_for(:item) %>
<tr id="<%=item.id%>">
<% for column in Item.content_columns %>
<td><%=h item.send(column.name) %></td>
<%
2008 Dec 16
5
More than one submit_tag in a single form
Hai everyone ,
I have a list of users(each user in a row)and an Approve button for each
user. I wish to change the status of the user to be approved when I
click on the Approve button of a user. When I tried getting all the
users in the params hash. I want to get the id of the user according to
which "Approve" button I clicked. How can I implement this one?
Thanks in advance.
--
Posted
2010 Nov 30
2
IE problem with submit_tag
I''m having some difficulty with IE8 on a Rails 2.3.5 app. I''ll state
from the outset that this problem does not occur with Firefox, Chrome,
or Opera when run on the same system so I''m reasonably certain I''ve
got an IE issue here.
Here''s a simple description:
I''m ending a Users#new form with:
<p><%= submit_tag, "Sign
2009 Sep 30
2
What is this view syntax? Old beast forum code...
Hey folks
A long time ago, before i started working at this company, we used a
Beast forum. The beast code (models, controllers and views) were all
just lumped in with our app code, but when we moved to a new version
(about a year and a half ago) the forum section of our site was closed
off (simply by not linking to it anywhere).
I''ve been tasked with resurrecting it, and the first
2008 Feb 20
1
text_field_tag - different parameter name
Hi, I have one problem with validation
I am creating e-shop and I have products. This view look like this:
<% for product in @category.products %>
<div class="produktyBox">
<%= product.title %><br />
Price: <br />
<div style="color:red; font-size:large; font-weight:bold; margin-
bottom:5px"><%=
2007 Feb 27
1
link_to :post true Newbie question
Hi All,
I am attempting to use a link_to helper to perform a form post using the
following construct:
<%= link_to ''Save'', {:action =>''create''}, :post => true %>
What I find is the parameters passed to the webserver are empty. My
model validation stuff triggers indicating the fields in question are
empty too. This is to create a new DB entry so no
2006 May 09
1
Reusing a model to form and link_to.
Hy guys,
Inside my app I have a form which contains user information.
Sometimes a have a form with a text_field as above:
<%= form_remote_tag(:html => { :action => url_for(:controller =>
"my_controller", :action => "my_action") }) %>
<%= text_field(''my_object'', ''my_parameter'', :maxlength =>
2006 Feb 07
3
Newbie help ..
Hi ..
I am new to Rails and it is not clear to me why I am getting the
following error. Any help appreciated.
-m.
$cat app/views/admin/new.rhtml
<% @page_title = "New member..." -%>
<%= start_form_tag( :action => ''create'' ) %>
<table>
<tr>
<td> First Name: </td>
<td> <%= text_field(
2007 Jul 24
2
reusing partials
Might be asking a daft question or missing something obvious here as
I''m a bit of noob at this, I''ve got the code below in a partial and am
using it to display and attach skills to degrees which is working
fine, I now need to do exactly the same thing for interests and was
wondering if there is any way to pass the partial a parameter which I
can then some how be used to replace
2008 Dec 31
7
Understand submit_tag
Hi everyone,
I was following the book Agile Web Development with Rails 2Ed. by Dave
Thomas.
So, at some part of my studies, I decided to try to create my own
application based on what I''ve learned...
Now I''m in trouble in a simple form.
I tried to create a form to register new users.
I''m sending attached the files that I created for this.
but my view don''t