On 15 July 2010 07:28, Mark Horrocks <[email protected]> wrote: > How do I set an id attribute like id="datepicker" in an input text_field > using a form helper. > > I tried this:- > <%= f.text_field :paid_date, :id="datepicker" %> > but it produces an error. > > Note that I want <input type="text" name="paid_date" id="datepicker"> as > the result, not <input type="text" name="datepicker[paid_date]"> which > is all I can find in the API.
Can you not just manage with the default id which should be <model_name>_paid_date I think? Colin -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

