Dan Munk wrote:> Hello,
>
> I am using jscalendar to allow the user to select a date and populating
> a readonly text field with the value. When I update the record the
> value does not persist. If I change the text field to editable the
> value saves fine. I am using the jscalendar to update the field the
> same way in both instances.
>
> Is there clean way to force the update?
>
> Thanks,
> Dan
Unfortunately, this is just the way the web works - the values in
readonly fields in a form are not passed to server (PHP, ASP all work
the same way, to my knowledge).
The easy way around it is to make the field a hidden text field, and add
an additional ''dummy'' readonly text field to display the value
to your
user. Your javascript should set the value of both fields when the user
selects a date. The readonly field is just for show, and won''t pass in
the form submit, but the hidden field will.
c.
--
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?hl=en
-~----------~----~----~----~------~----~------~--~---