2

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?

2

A solution is now available in the Sprout Forms documentation: Example > Pre-populating a Field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.