I would like to “post” text from the page the user is currently viewing (if this is possible) to a ‘new’ action in rails so that it can pre-load a given field for the user to review before he/she submits the form. I am not sure if an ajax post can help. A GET call to ‘new’ with a query string won’t work due to the limit on chars for IE. Thank you.
Share
Use the
:valueattribute:Then (for example) POST the variables you need with
link_to:Or (another example) with javascript (jQuery):
**An AJAX post will not work as the page will not be redirected. You will need to simulate a form post.
The name field will be pre-populated with “Bob”. You will of course need the following in your controller action: