20 May 22:11
Re: help needed with where and how best to set a param
From: Becca Girl <rails-mailing-list@...>
Subject: Re: help needed with where and how best to set a param
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-05-20 20:11:20 GMT
Subject: Re: help needed with where and how best to set a param
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-05-20 20:11:20 GMT
AndyV wrote:
If you follow the logic presented in the recipe you should be
> able to extend it to denote required fields, too. You should be able
> to provide a 'required' attribute in a similar way they provide the
> override for the label.
I'm still learning my way around RoR. I see this in the DRY Forms
helper code:
@template.capture do
locals = {
:element => yield,
:label => label(field, options[:label])
}
Would I add something there to designate that I need the required fields
to look a little different?
Here's the form field template and how it's displayed:
<span class="label">
<%= label %>
</span>
So if it's required, I want to add a red asterisk.
Thanks for helping a newbie.
--
--
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@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
RSS Feed