Is there a way to set a distinct ID and name for a text_field in Rails 2?
I've got a Rails 2 site I'm trying to add a form handler to, but I'm
running into problems converting the html form fields into form handler
fields.
The form code begins with:
<% form_for @newsavedmap, :html=>{:id=>'createaMap'} do |f| %>
I keep getting errors when I try things like
<%= text_field :newsavedmap, :html=>{ :value => 'New Map',
:name=>'newsavedmapname', :id=> 'savedmap_name', :size => '30' } %>
Error:
ActionView::TemplateError (wrong number of arguments (1 for 2)) on
line #284 of app/views/layouts/maptry.html.erb:
Here are the fields. How can I convert these to form handler fields in
Rails 2?
<input id="savemap_name" name="newsavedmapname" size="30" type="text"
value="New Map"></p>
<select id="startdrop" name="startthere">
<OPTIONS HERE>
</select>
<select multiple id="waypoints" class="mobile-waypoints-remove"
name="waypointsselected[]">
<OPTIONS HERE>
</select>
Thanks for any help you can provide!
No comments:
Post a Comment