I have a minor problem. I have your basic ''new'' method in my web application where you fill out some form fields and click the ''create'' button to submit a new entry in the database in the associated table. I implemented validation in my model (validates_presence_of, etc.) so that select fields are not left blank. One of my form fields are radio buttons. When select fields are blank (those ones I explicitly say I do not want left blank) I get rails error message: 4 errors prohibited this form from being saved There were problems with the following fields: * attribute1 can''t be blank * attribute2 can''t be blank I have no problem with this error. It''s fine as it is. However, my problem is that when I reach this point where it displays error messages, line breaks occur where I do not want them to. One example in particular is my radio buttons. They are in this form originally: O option1 O option2 O option3 After the error messages are displayed lines start breaking like so: O option1 O option2 O option3 This is probably due to how it highlights the form fields affected, red. I actually commented out all css styling associated with the error messages, but solved nothing. Is there a solution to this problem? Thanks. -Gilles -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Mark Reginald James
2006-Sep-22 14:39 UTC
Re: form fields causing line breaks when there are errors
Gilles wrote:> I have no problem with this error. It''s fine as it is. However, my > problem is that when I reach this point where it displays error > messages, line breaks occur where I do not want them to. One example in > particular is my radio buttons. > > They are in this form originally: > > O option1 > O option2 > O option3 > > After the error messages are displayed lines start breaking like so: > > O > option1 > O > option2 > O > option3 > > This is probably due to how it highlights the form fields affected, red. > I actually commented out all css styling associated with the error > messages, but solved nothing. Is there a solution to this problem? > Thanks..fieldWithErrors { display: inline } should work. -- We develop, watch us RoR, in numbers too big to ignore. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---