Support Thread

Getting & Displaying Custom Registration Field Data

📅 👤 ASP Playground
Getting & Displaying Custom Registration Field Data — APG vNext Guide

This archived community thread from the APG vNext support forum discusses: Getting & Displaying Custom Registration Field Data.

About This Topic

Our software has the ability to collect custom data from users on the registration form / profile page. You can define the custom fields in the Custom Regist...

Getting Help with APG vNext

APG vNext is a powerful ASP.NET forum and community platform. For questions related to this topic:

If you need direct assistance, the support team is active in the community forum.

Getting and Displaying Custom Registration Field Data in APG vNext

After setting up custom registration fields, the data collected is stored in apg_MemberFieldValues and accessible both via SQL and through APG vNext's template engine. This guide covers how to display custom field data in member profiles, thread posts (in the author info area), and the admin panel member list.

Displaying Custom Fields in Member Profiles

APG vNext automatically displays all "visible to members" custom fields in the member profile page. To customise the layout, override the profile template:

<!-- In /skins/[YourSkin]/member-profile.ascx -->
<asp:Repeater DataSource='<%# Member.CustomFields %>' runat="server">
  <ItemTemplate>
    <dt><%# Eval("FieldName") %></dt>
    <dd><%# Eval("FieldValue") %></dd>
  </ItemTemplate>
</asp:Repeater>

Displaying a Specific Custom Field in Post Author Info

<!-- Show member's "Company" custom field beside their name in post author area -->
<span class="author-company">
  <%# Author.GetCustomField("Company") %>
</span>

Querying Custom Field Data via SQL

-- Get all custom field values for a specific member:
SELECT f.FieldName, v.FieldValue
FROM   apg_MemberFieldValues v
JOIN   apg_RegistrationFields f ON f.FieldID = v.FieldID
WHERE  v.MemberID = @MemberID
ORDER  BY f.FieldOrder;

Exporting Custom Field Data for All Members

-- Pivot custom fields into columns for export:
SELECT m.UserName, m.Email,
       MAX(CASE WHEN f.FieldName = 'Company'  THEN v.FieldValue END) AS Company,
       MAX(CASE WHEN f.FieldName = 'JobTitle' THEN v.FieldValue END) AS JobTitle
FROM   apg_Members m
LEFT   JOIN apg_MemberFieldValues v ON v.MemberID = m.MemberID
LEFT   JOIN apg_RegistrationFields f ON f.FieldID = v.FieldID
GROUP  BY m.UserName, m.Email
ORDER  BY m.UserName;

Related Resources

Advanced Custom Field Display in Templates

Displaying custom registration field data in APG vNext skin templates allows personalised community experiences that reflect information members provided at registration. Beyond simply displaying the value, templates can branch based on custom field values to show different content to different member segments. For example, a community that collects a Skill Level field (Beginner, Intermediate, Expert) at registration can display skill-appropriate tips in the forum sidebar, show different navigation options, or highlight relevant Knowledge Base articles based on the member's skill level. Access the custom field value in Razor templates through the member data object and use conditional rendering to create the personalised experience.

Custom Fields in Search Filters

APG vNext can expose custom registration fields as searchable filters in the member directory, allowing members to find others with specific attributes. For professional communities where members list their company, job title, or area of expertise, member directory search filtered by these custom fields helps members build relevant professional connections within the community. Configure which custom fields appear as directory search filters in Admin Panel → Members → Member Directory → Search Filters. Fields configured as directory filters are indexed in the database for efficient search queries — avoid making high-cardinality free-text fields searchable directory filters, as these generate very large indexes with poor search performance.

Custom Field Privacy Controls

APG vNext custom registration fields support individual privacy settings that allow members to control who can see each field's value. Configure the visibility options for each field in Admin Panel → Members → Custom Fields → [Field Name] → Visibility. Common visibility options are: public (visible to all visitors including guests), members only (requires login to view), friends only (visible only to members the user has connected with), and private (visible only to the member themselves and administrators). When displaying custom field data in templates, check the visibility permission for the viewing context — the APG vNext member profile template automatically enforces visibility settings, but custom template modifications that bypass the standard member data access layer may expose private field values to unauthorised viewers.

Validating Custom Field Data on Registration

APG vNext custom registration fields support several validation types: required (field must not be empty), regex pattern (value must match a specific format, e.g., a valid job title format), minimum and maximum length, and allowed values list (dropdown or radio button with predefined options). Validation is enforced client-side during form completion and server-side on submission. For data quality purposes, use allowed values lists for fields where you need consistent data (e.g., industry sector, country) rather than free-text fields, which produce highly variable data that is difficult to analyse or filter. Free-text fields are appropriate for fields where member expression is the goal (bio, personal website URL, custom pronouns).


Looking for more help? Browse the support forum or check the Knowledge Base.