# How do I return values when using form\_for

**URL:** <https://www.ruby-forum.com/t/how-do-i-return-values-when-using-form-for/164086>\
**Category:** Rails\
**Created:** [March 27, 2009, 6:44pm UTC](https://www.ruby-forum.com/t/how-do-i-return-values-when-using-form-for/164086 "2009-03-27T18:44:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![siddharth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@siddharth](https://www.ruby-forum.com/u/siddharth)\
**Post date:** [March 27, 2009, 6:44pm UTC](https://www.ruby-forum.com/t/how-do-i-return-values-when-using-form-for/164086/1 "2009-03-27T18:44:25Z")

</div>

Hi I am trying to build a simple app where I’m trying to do pretty what  
scaffold does. My question is when I am using ‘form\_for’ how do I return  
the id while editing the application like its done in the form\_tag

for example

# Editing book

\<% form\_tag :action =\> ‘update’, :id =\> @book do %\>  
\<%= render :partial =\> ‘form’ %\>  
\<%= submit\_tag ‘Edit’ %\>  
\<% end %\>

\<%= link\_to ‘Show’, :action =\> ‘show’, :id =\> @book %\> |  
\<%= link\_to ‘Back’, :action =\> ‘list’ %\>

Here the :id=\>@book sends the id back so that i can find it in my  
controller before i update it similarly how can i send something back  
with the form\_tag without using the hidden tags.
