Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

if a text_field_tag form helper in rails is disabled, does it not submit?

I have a text_field_tag in my form, i really want it just for display (all my jquery updates this text field), using a date picker. Though I don't want the user to type in here, so I said the :disabled => true and sure enough it is disabled, values change here but in my ajax remote call they do not save, only if that text_field_tag is enabled does it save. Is there any work around this?

like image 839
Codejoy Avatar asked Feb 25 '13 21:02

Codejoy


1 Answers

Use :readonly => true instead

like image 107
Arctodus Avatar answered Sep 21 '22 12:09

Arctodus