I want to change parts of this form in order to use default values (with a disabled input). The problem is if I change it from text_field to text_field_tag that part of the form stops functioning. It seems like a silly question, but its been driving me crazy. Any help would help. Steve. <%= error_messages_for ''post'' %> <!--[form:post]--> <p><label for="post_title">Title</label><br/> <%= text_field ''post'', ''title'' %></p> <p><label for="post_author_name">Author''s Name</label><br/> <%= text_field ''post'', ''author_name'' %></p> <p><label for="post_permalink">Permalink</label><br/> <%= text_field ''post'', ''permalink'' %></p> <p><label for="post_influence_level">Influence level</label><br/> <%= text_field ''post'', ''influence_level'' %></p> <p><label for="post_disclosure">Disclosure</label><br/> <%= text_area ''post'', ''disclosure'' %></p> <!--[eoform:post]--> -- View this message in context: http://www.nabble.com/A-quick-question-on-forms-tf1958604.html#a5372587 Sent from the RubyOnRails Users forum at Nabble.com.
SSpalding wrote:> I want to change parts of this form in order to use default values (with > a > disabled input). The problem is if I change it from text_field to > text_field_tag that part of the form stops functioning. It seems like a > silly question, but its been driving me crazy. Any help would help. > > Steve. > > <%= error_messages_for ''post'' %> > > <!--[form:post]--> > <p><label for="post_title">Title</label><br/> > <%= text_field ''post'', ''title'' %></p>well to give this a set value and make it read only, change it to: <%= text_field ''post'', ''title'', :value => "This is the title that appears", :readonly => true %> or you could make it a hidden field: <%= hidden_field ''post'', ''title'', :value => "You won''t see this but it will get passed to the destination as params[:post].title" %> Hope that works! Ben Lisbakken -- Posted via http://www.ruby-forum.com/.