David Koontz
2007-Apr-27 09:00 UTC
[Masterview-users] Giving default value to hidden field
I was wondering if there''s a way to get a value into the hidden_field tag generated by mv:hidden_field. Currently the value attribute of the html input tag is not being used, could it perhaps become a :value => hash on the hidden_input rails helper? David Koontz
Jeff Barczewski
2007-Apr-30 02:14 UTC
[Masterview-users] Giving default value to hidden field
On 4/27/07, David Koontz <david at koontzfamily.org> wrote:> > I was wondering if there''s a way to get a value into the hidden_field > tag generated by mv:hidden_field. Currently the value attribute of the > html input tag is not being used, could it perhaps become a :value => > hash on the hidden_input rails helper? >Yes, the mv:hidden_field currently is used to populate the hidden tag using an object and method (like from ActiveRecord). If you want to dynamically set the value from somewhere else, you can use the mv:attr directive instead. <input type="hidden" name="foo" value="dummy" mv:attr=":value => #{bar}"/> Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070429/3b198b2d/attachment-0001.html