text_field_tag question

Hi,

I'm using a text_field_tag to provide a place for user input which does not need a model or table associated with it. It is used for jQuery to compare a users input with another field value. If I place the text_field_tag within a form_for it looks for a route which I do not want or need and an error is generated.

If I place it outside the form_for it works fine but then I can't position it on the page where I want it very easily.

I am a novice and am wondering if I am either using the wrong type of input field or really do need to keep it outside the form_for and deal with its page positioning thru CSS.

Thanks,

Dave Castellano

Dave Castellano wrote in post #1155335:

Hi,

I'm using a text_field_tag to provide a place for user input which does not need a model or table associated with it. It is used for jQuery to compare a users input with another field value. If I place the text_field_tag within the form_for code for the page, upon data entry it looks for a route which I do not want or need and an error is generated.

Sorry, looks like this is not a Rails problem at all. The form is submitted when I press the enter key by default so I guess I have to disable it in jQuery!