John Kopanas
2006-Feb-13 19:57 UTC
[Rails] Getting Rid of Error Divs around fields that have errors
Is there a way to get rid of the divs around an error field. These divs are causing me headaches. Any suggestions :-)? John Kopanas http://www.kopanas.com ====================================================================http://www.soen.info - source of the freshest software engineering information on the net http://cusec.soen.info - software engineering conference
Bob Silva
2006-Feb-13 20:16 UTC
[Rails] Getting Rid of Error Divs around fields that have errors
Try this CSS to fix your layout problems. div.fieldWithErrors { display:inline; } -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of John Kopanas Sent: Monday, February 13, 2006 11:57 AM To: rails@lists.rubyonrails.org Subject: [Rails] Getting Rid of Error Divs around fields that have errors Is there a way to get rid of the divs around an error field. These divs are causing me headaches. Any suggestions :-)? John Kopanas http://www.kopanas.com ====================================================================http://www.soen.info - source of the freshest software engineering information on the net http://cusec.soen.info - software engineering conference _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails
John Kopanas
2006-Feb-13 20:21 UTC
[Rails] Getting Rid of Error Divs around fields that have errors
I still get XHTML validation errors. I would like to just not have the extra divs added. There must be an easy way to do this? On 13-Feb-06, at 3:17 PM, Bob Silva wrote:> Try this CSS to fix your layout problems. > > div.fieldWithErrors { display:inline; } > > > -----Original Message----- > From: rails-bounces@lists.rubyonrails.org > [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of John Kopanas > Sent: Monday, February 13, 2006 11:57 AM > To: rails@lists.rubyonrails.org > Subject: [Rails] Getting Rid of Error Divs around fields that have > errors > > Is there a way to get rid of the divs around an error field. These > divs are causing me headaches. Any suggestions :-)? > > John Kopanas > http://www.kopanas.com > > > ====================================================================> http://www.soen.info - source of the freshest software engineering > information on the net > http://cusec.soen.info - software engineering conference > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/railsJohn Kopanas http://www.kopanas.com ====================================================================http://www.soen.info - source of the freshest software engineering information on the net http://cusec.soen.info - software engineering conference
Lukáš Konarovský
2006-Feb-13 20:29 UTC
[Rails] Re: Getting Rid of Error Divs around fields that have errors
> I still get XHTML validation errors. I would like to just not have > the extra divs added. There must be an easy way to do this?in enviroment.rb put for example this (replace divs with spans) ActionView::Base.field_error_proc = Proc.new { |html_tag, instance| "<span class=\"fieldWithErrors\">#{html_tag}</span>" } or for remove the divs: ActionView::Base.field_error_proc = Proc.new { |html_tag, instance| "#{html_tag}" } -- Posted via http://www.ruby-forum.com/.