Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pass disabled textbox value in Rails?

How may i pass disabled textbox value on controller side ?

Right now i am getting nil value for the disabled textbox.

like image 991
krunal shah Avatar asked Mar 17 '11 05:03

krunal shah


1 Answers

This is an http thing, if you disable a form element it does not get sent over the wire. You can either set the readonly='true' attribute with javascript and style it to appear disabled, or use javascript to copy the value to a hidden field. unfortunately, you there is no way to just tell it to send.

like image 146
Matt Briggs Avatar answered Nov 02 '22 12:11

Matt Briggs