Consider trying to use the Rails form helpers instead of hand coding the html form elements yourself.