<p>To dynamically display a Form that you've related to an Entry using a Sprout Forms Form relations field you can pass the handle of the form to the <code>displayForm()</code> tag in your template:</p>

<p><strong>_entry.html</strong></p>

<pre><code>{% set formHandle = entry.formFieldHandle.first().handle %}

{{ craft.sproutForms.displayForm( formHandle ) }}
</code></pre>

<p>There is a doc page that describes this here: <a href="http://sprout.barrelstrengthdesign.com/craft-plugins/forms/docs/examples/relations-field-on-entry-page" rel="nofollow">Relations Field on Entry Page</a> and depending on where you want to redirect the user after they submit the form, Sprout Forms also supports <a href="http://sprout.barrelstrengthdesign.com/craft-plugins/forms/docs/customization/redirects" rel="nofollow">relative redirects</a>.</p>

CC BY-SA 3.0
2016-01-31T23:31:40.733Z
2016-01-31T23:31:40.733Z
Ben Parizek
<p>Using Sprout Forms and have added the Form Name > Select a Form to the Entry's field layout.
<a href="https://i.sstatic.net/DUrUz.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DUrUz.png" alt="entry field layout"></a></p>

<p>After I select a form on this Entry, what do I hook into to get this to display on my template?
<a href="https://i.sstatic.net/yNTBB.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/yNTBB.png" alt="selected form in entry"></a></p>

<p>I know from the documentation that you can specifically pass in the form's Handle <code>{{ craft.sproutForms.displayForm('myForm') }}</code>, but what do I need to do to get the drop-down form to display if there is one selected?</p>

CC BY-SA 3.0
2016-01-28T21:54:52.443Z
Hey David, can you help me understand what you are trying to do here?  Am I correct in thinking that you have a Form that allows a user to create a relationship to another Form? Also, what are you expecting to be displayed in your template?  Would a dropdown field that lists all the Forms you have in Sprout Forms be what you want to output?
Ben Parizek
CC BY-SA 3.0
2016-01-31T23:26:33.993Z
Ignore that last comment.  The question is clear.  I was misreading it.
Ben Parizek
<plugin-sproutforms>
Using an Entry's Added Form in a template in Sprout Forms
# Using an Entry's Added Form in a template in Sprout Forms

(Asked by: username_0 on 2016-01-28)

Using Sprout Forms and have added the Form Name > Select a Form to the Entry's field layout.
[![entry field layout](https://i.sstatic.net/DUrUz.png)](https://i.sstatic.net/DUrUz.png)

After I select a form on this Entry, what do I hook into to get this to display on my template?
[![selected form in entry](https://i.sstatic.net/yNTBB.png)](https://i.sstatic.net/yNTBB.png)

I know from the documentation that you can specifically pass in the form's Handle `{{ craft.sproutForms.displayForm('myForm') }}`, but what do I need to do to get the drop-down form to display if there is one selected?

**Tags:** plugin-sproutforms

> **Comments:**
> **username_1**: Hey David, can you help me understand what you are trying to do here?  Am I correct in thinking that you have a Form that allows a user to create a relationship to another Form? Also, what are you expecting to be displayed in your template?  Would a dropdown field that lists all the Forms you have in Sprout Forms be what you want to output?  
> **username_1**: Ignore that last comment.  The question is clear.  I was misreading it.  

---

## 1 answers

### Answer by username_1 on 2016-01-31. Score: 1

To dynamically display a Form that you've related to an Entry using a Sprout Forms Form relations field you can pass the handle of the form to the displayForm() tag in your template:
_entry.html
{% set formHandle = entry.formFieldHandle.first().handle %}

{{ craft.sproutForms.displayForm( formHandle ) }}

There is a doc page that describes this here: Relations Field on Entry Page and depending on where you want to redirect the user after they submit the form, Sprout Forms also supports relative redirects.


---

