# Embedding a form is lots of various place

**URL:** <https://www.ruby-forum.com/t/embedding-a-form-is-lots-of-various-place/189673>\
**Category:** Rails\
**Created:** [June 4, 2010, 9:04pm UTC](https://www.ruby-forum.com/t/embedding-a-form-is-lots-of-various-place/189673 "2010-06-04T21:04:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theduz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/90ced4/32.png) [@theduz](https://www.ruby-forum.com/u/theduz)\
**Post date:** [June 4, 2010, 9:04pm UTC](https://www.ruby-forum.com/t/embedding-a-form-is-lots-of-various-place/189673/1 "2010-06-04T21:04:40Z")

</div>

Hi,

I’ve been asked to put a ‘contact us’ form in many and various places  
on our site. Initially, I proposed we simply link to the contact us  
form, which is already handled by a model, view and controller, but  
the users would like the form itself to appear. I can certainly  
enclose the form in a partial, and include the partial, but then it  
seems I have to update many and various controllers with code to  
support the form loading, submission, and saving. It doesn’t seem  
very dry.

Another thought - I could build the contact form controller and  
view(s) with no layout, and then include the URL to the contact form  
wherever necessary via iframe. I think that would be workable, but  
doesn’t seem very rails-like.

Is there a rails idiom for including what I would term ‘an unrelated  
and self contained form’ within some other model/view/controller ?

Thank you.

Regards,  
Rich
