Displaying 20 results from an estimated 5000 matches similar to: "error_messages with form_tag"
2006 Jul 17
2
error_messages_for ?
Hi,
I can''t list error_messages in my Form ??, and all the formfields are
reset ...(I think my redirect :back clean everything, formfield and
error_messages ...), only my flash[:notice] is ok....
I would like to use the "error_messages_for" tag to add a simple red *
on my textfiled if a problem occurs ...
thanks for help
arnaud
here are the basics steps to check that
2008 Jan 14
5
Only "form_tag" support uploading file?
Hi, there:
I wanna use plug-in "file_column" to upload image to the server. In
my test app, the view is as follow & it works well:
====================
<h1>New entry</h1>
<%= error_messages_for ''entry'' %>
<% form_tag ''create'', :multipart => true do -%>
<p><label
2005 Dec 19
7
Error handling!
Hello all,
I''m in the beginning states of learning ruby on rails development and
have got to a part where I''m a little stuck! Basically writing a simple
blog application, just to try something completely different! ;-)
I have a page which displays the current blog entry, it''s comments and
at the bottom of the page, a form to add a comment. So far, so good.
2009 Mar 09
2
form_tag error: only get requests allowed
I am getting above error while updating an item using form_tag helper.
<h1>Edit Topic Item</h1>
<% form_tag edit_topic_item_path(@item.topic, @item), :html => { :method
=> :put} do %>
<%= render :partial => ''item_form'', :object => @item %>
<%= submit_tag ''Save'' %>
<% end %>
<%= link_to ''Add
2008 Apr 09
3
form_tag and form_for cause #protect_from_forgery errors
Hey All,
I''m trying to do a simple form_for (and I also get it with form_tag)
and I''m getting the following error:
ActionView::TemplateError (No :secret given to the
#protect_from_forgery call. Set that or use a session store capable
of generating its own keys (Cookie Session Store).) on line #2 of
users/new.fbml.erb:
1: <h1>Welcome To Courses, Let''s Get
2008 Oct 15
2
Adding an id to form_tag
Hi all,
When using form_for it is easy to add an id to the form using :html =>
{:id => ''someid''}
However, how would one accomplish the same when using the form_tag ?
Thank you in advance,
Schalk
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post
2013 Dec 10
2
form_tag + fields_for Rails 4
Hi There,
I''m trying to user fields_for inside a form_tag, but i can''t catch it
on my controller.
I just take some html code off to makes it easy to read
my view...
i''m using campuses_path(current_church, @campus) instead form_for
@campus, because my route is like
resources :campuses, :path => ":church/campuses"
<%= form_tag
2007 Feb 13
1
form_tag only useful for pages with a single form?
Howdy, I''m new to rails and I''m learning form Agile Web Dev with Rails.
It seems all of the examples that use form_tag use it in situations
where the action first creates a new object before doing a
request.post...
If I''m in a situation where I''m managing Roles, Rights, and assignments
of rights to roles, I may want to have one little form with a text field
and
2010 Sep 01
5
validation errors bring up stack trace error page
hello!
I made some custom validations for my app, which do catch invalid data
in the console. However, when I enter invalid data through a form on the
browser view, I get your stack trace error style page (similar to what
you see when you get a syntax error or a nil object) instead of the
nicely styled error messages (what you would see in a scaffolded
application.
First off, what is the stack
2008 Sep 16
7
id in form_tag for update
I get an error saying Rails can''t find the post because I don''t have an
id when doing the update. I have:
<% form_tag ''/meetings/update'', :id => @calendar.id, :onsubmit =>
''return ValidateMeeting()'' do %>
Is this wrong?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You
2006 Jul 24
6
error_messages_for not working
I have the following code and I am not able to get it working. The error
message is not coming on the top, it is just getting displayed on a
different page if I dont have the rescue block commented at the bottom.
Model: user.rb
require "digest/sha1"
class User < ActiveRecord::Base
validates_presence_of :eaddress, :fname, :passwd, :pcode, :country,
:day, :year, :month, :gender,
2009 Feb 06
2
Using partials with form_for
hi all
i was wondering whether it is possible to use partials along with form_for
and form_field. following code is not working. is there some error or this
case is impossible..??
*#new.html.erb*
<h1>Enter Details for new Partner:</h1>
<% form_for(@partner) do |f| %>
<%= render :partial => ''form'', :locals => {:partner => f} %>
<p>
2006 Oct 13
2
form_for() and name
how can i give name attributes for form_for(), so it will give an output
like <form name="f">. it is because that i need to access the form name
for javascript manipulation.
as far as i know, name can only used in form_tag(), but i currently have
more than 50 forms that built using form_for(). the structure is like
this:
<% form_for symbol, item,
:url => { :action
2006 Aug 02
7
form_for not working with Markaby
I''m playing around with Markaby and I decided to write a little blog app.
I''m running into issues with forms however. If I use form_for the output of
the form gets swallowed. For example:
form_for :article, @article do |f|
f.text_field :title
f.check_box :published
f.text_area :description
f.text_field :pub_date
f.text_area :content
end
gets rendered as an empty form
2011 Aug 02
2
removing instance variables in partials?
Hi,
I read some articles about why partials should not have instance
variables in them. But in "Ruby on Rails 3 Tutorial" the author starts
with this partial:
View:
<%= form_for(@user) do |f| %>
<%= render ''shared/error_messages'' %>
Partial:
<% if @users.errors.any? %>
...
...
I thought removing the @user instance variable from the partial
2008 Feb 04
2
attachment_fu and form_tag for multiple models?
hi, i''ve got a page where i''m trying to save the user''s profile
information and an image of the user, but i''m having trouble with using
attachment_fu and the form_tag method.
now i know attachment_fu isn''t designed for form_tag but am really
hoping someone has a solution for this as frankly i''m stumped.
here''s the form_tag part in
2009 Sep 17
2
Can i use "form_remote_tag" inside the "form_tag"?
Hi all,
How can i use form_remote_tag inside the form_tag helper .
My application has following view subscribe.html.haml
- form_tag :action => :subscribe do
/other form element
%input{:type=>''radio'', :name=>''tariff_plan_id'', :value=>"monthly"}
%input{:type=>''radio'',
2010 Feb 07
0
using form_for in a partial
Hello,
I would like a user to fill out a form (a long contract) and then email
it to them, including the new values.
So I was leaning towards a partial or layout so I didn''t have to write
the contract twice. But that''s where I run into problems. The only
difference between the form (contract) and the email are the form tags
will be replaced with their actual values. For
2006 Feb 17
2
form_tag with protocol => ''https'' help
Hi,
I am not having much luck using the form_tag with a protocol. I try
the following in my view: index.rhtml
<%= form_tag({:controller => ''home'',:action => ''login'',:protocol =>
''https''},{:method => ''post''}) %>
hoping it would generate
<form action=''https://myhost.com/home/login''
2010 Oct 20
2
form_tag not working correctly?
So I''m trying to make
<form action=''/path'' method=''get'' class=''ajax_box''>
using:
<% form_tag :action => "search_for", {:method => :get, :class =>
''ajax_box''} do %>
but I get:
<form action=''/path?method=get&class=''ajax_box''