# Simple form with option to go to advanced form

**URL:** <https://www.ruby-forum.com/t/simple-form-with-option-to-go-to-advanced-form/159687>\
**Category:** Rails\
**Created:** [February 7, 2009, 4:13am UTC](https://www.ruby-forum.com/t/simple-form-with-option-to-go-to-advanced-form/159687 "2009-02-07T04:13:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scudco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@scudco](https://www.ruby-forum.com/u/scudco)\
**Post date:** [February 7, 2009, 4:13am UTC](https://www.ruby-forum.com/t/simple-form-with-option-to-go-to-advanced-form/159687/1 "2009-02-07T04:13:08Z")

</div>

I have a todo list involving projects and tasks and im using nested  
resources. In Projects Show - i list all tasks associated with the  
project. I also have a simple “add task” which allows the user to add a  
task but only specify the title. Other attributes are set to default  
(e.g. due date = None, priority = NA etc).  
This form is sent to project\_tasks\_path i.e. create in Task Controller.

I want an “Advanced Add Task” button on this form which when clicked  
will reload the same project show view but with a full form comprising  
of title, due date, lable etc.

I know i can create a new submit button in the current form

\<%= submit\_tag “Advanced Add Options”, :class =\> “submit\_advanced”,  
:name =\> “advanced\_add” %\>

and then in the receving action use

if params[:advanced\_add]  
render :show  
end

and in show have

if params[:advanced\_add]  
show the advanced form  
else  
show the simple form  
end

but because the form is going to create in the task controller it means  
the task controller create action is managing the projects show actions  
logic which i dont think is good.

I thought about using link\_to but I can only pass an :id via params to  
the controller.  
How do i go about this?
