In this article, we will demonstrate how with just a couple clicks, you can set up your community form to prefill data from your Logged in User.
First, you will want to ensure that your Remote Site Settings are configured properly
For the purpose of this article, we've already built our form. So now, let's publish it, and navigate to our publishing options.
From here, simply enable Dynamic Prefill, and you will be presented with some new options. Our form has a contact object, and provides us with an automatic set up for Dynamic Prefill:
NOTE: This option only is presented if you have a Contact or User object in your form.
Once it has been set up, hit Save Prefill.
With Prefill in place, prefilling the details from the contact record, you can now log in to your community as a user, and see the details from their related contact record.
If you do NOT want to prefill based on the logged in User context, you can specify matching criteria on your primary object, and display records that are related to this object within the community
In the above example, any Contact record that is related to an account named "Test2000" will be prefilled here.