CRM
User Details
9min
the user details layout contains the user's name, email and custom field set data it can also be used as a container for other crm layouts prerequisites this layout must be outputted inside a page protected by a secure zone you can use the following links to learn how to set up a secure page and the means to access it create a secure zone create a secure zone sign up form add a secure zone to a page introduction the user details layout contains a {{this}} object with the basics of the user, as well as details that have been added to the crm record via custom field sets as such, it can be useful (though it is optional) to use this layout as the container for all other crm layouts this allows other layouts e g user secure zones to also have access to both their specialist data and the more general user data, allowing you to build more complex layouts syntax {% include 'user details', layout 'default' %} parameters layout choose a layout to use file structure you can find the user details layouts at the following path in code editor layouts/modules/module 5/user details/ inside this folder, a single liquid file can be created to act as your layout there is no "wrapper" and "item" file needed for this kind of layout developing the layout available standard fields {{this name}} {{this first name}} {{this last name}} {{this email}} {{this created at}} the date the user first signed up or submitted a form on the site {{this updated at}} the last date the user's crm data was updated {{this\['company']}} an array of companies this user is connected to {{this\['address']}} an array of addresses stored against this user accessing custom crm fields inside a user details layout, you can access custom crm fields by using {{this properties user field 1}} to get the field by it's field id accessing custom field sets accessing custom field sets will depend on the custom field set data you have set up on your site each custom field set has a unique id number assigned to it, and data is organised based on this number accessing data from a custom field set by a specific custom field set id custom field sets allow you to store custom fields directly against a module item in the case of the crm, they are used to store fields against a user which can be kept up to date you can learn more about custom field sets here in the following example, i'll be accessing data from the custom field set 3 (profile) you can use this example and replace the id 3 for the id of your custom field set {{this custom field sets cfs 3 cfs name}} the name of this custom field set {{this custom field sets cfs 3 properties cfs field 3 1}} the first field of the custom field set replace the id number at the end to fetch any field you may find it more helpful to output your available fields as json and use this to write your code outputting {{this}} will fetch the data as json, e g