<p>A solution is now available in the Sprout Forms documentation: <a href="https://sprout.barrelstrengthdesign.com/craft-plugins/forms/docs/examples/pre-populating-a-field" rel="nofollow noreferrer">Example > Pre-populating a Field</a>.</p>

CC BY-SA 3.0
2017-11-30T11:34:22.813Z
2017-11-30T11:34:22.813Z
Romain P.
<p>I'm outputting a Sprout form on my site so that users can request an update to their profile using the short code</p>

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

<p>I would like to pre-populate the form with information from the current entry object in the template. I tried to do something like this...</p>

<pre><code>{{ craft.sproutForms.displayForm('updateStoreDetails', {
    "fields": {
        "memberId": {
            "value": 12345
        },
        "name": {
            "value": "Michael"
        }
    }
}) }}
</code></pre>

<p>but it doesn't seem to do the trick. Is there a way of doing this?</p>

<plugin-sproutforms><craft-pro>
Prepopulate Sprout Form using an entry
# Prepopulate Sprout Form using an entry

(Asked by: username_0 on 2016-04-21)

I'm outputting a Sprout form on my site so that users can request an update to their profile using the short code
{{ craft.sproutForms.displayForm('updateStoreDetails') }}

I would like to pre-populate the form with information from the current entry object in the template. I tried to do something like this...
{{ craft.sproutForms.displayForm('updateStoreDetails', {
    "fields": {
        "memberId": {
            "value": 12345
        },
        "name": {
            "value": "Michael"
        }
    }
}) }}

but it doesn't seem to do the trick. Is there a way of doing this?

**Tags:** plugin-sproutforms, craft-pro


---

## 1 answers

### Answer by username_1 on 2017-11-30. Score: 2

A solution is now available in the Sprout Forms documentation: [Example > Pre-populating a Field](https://sprout.barrelstrengthdesign.com/craft-plugins/forms/docs/examples/pre-populating-a-field).


---

