On Sat, Mar 20, 2010 at 11:52 AM, Joshua Martin <josmar52789@gmail.com> wrote:
> The text_field should be disabled so that the user can't put it a
> random date without regard to the terms or invoice date.
>
> However, adding the :disabled attribute to the text_field, or adding
> the disabled attribute via JQuery results in the value not being saved
> when the invoice is created.
>
> How can I make the value of the disabled text_field be recorded during
> the @invoice.save?
You can't because, by definition, a disabled control cannot be
successful:
<http://www.w3.org/TR/html401/interact/forms.html#adef-disabled>
What you probably want to use is "readonly", defined immediately
following the above entry...
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment