Retrieving Logged-in User Details and Rendering It on a Form
The objective of this guide is to demonstrate how to retrieve information about the
currently logged-in user in a web application and display specific user details on a form.
Expected output:
1st Step
Add a Hidden field control to collect user details.
2nd Step
Set the database field name as desired and select 'User Detail' as the appropriate source type.
3rd Step
The user detail value will now be stored in the database field. You can view this value by
checking the model.
4th Step
Now we will fetch the user's email from the user details. To do this, add a Hidden
control and set the database field name that you want to store. In the model value,
put the database field name from 'UserDetail', then add a '.' and set the attribute
that we need to fetch from the user details. In this case, we are retrieving the user's
email, as shown in the screenshot.
5th Step
Now, we will display the fetched value in a label. To do this, add a label control
and configure it to display the value.