The LifterLMS Membership Catalog: Setup and Customization
Set up the LifterLMS membership catalog page, choose its sorting and visibility rules, decide whether you need a catalog at all, and customize…
Read articleSooner or later you need to know more about your students than a name and an email address. A training company wants the employer and job title. A continuing education provider needs a licence number. A school wants the year group. LifterLMS custom fields let you ask for that information on the forms students already fill in, and keep the answers on their user account.
This guide explains what the free plugin can and cannot do with forms, when the paid Custom Fields add-on is the right answer, and how a developer can add fields with a filter instead. Then it covers the part most tutorials skip: getting the data back out and using it.
It assumes LifterLMS is installed and your checkout works. For the forms themselves, start with our guide to LifterLMS registration and account forms.
LifterLMS keeps its student information forms under LifterLMS > Forms. There are three core forms, one for each place a student enters their details:
| Form | Where it appears |
|---|---|
| Checkout | The billing information step of checkout and free enrollment |
| Registration | Open registration on the student dashboard and the [lifterlms_registration] shortcode |
| Account | The Edit Account area of the student dashboard |
Each form is edited in the block editor. In the free plugin you can reorder fields, change labels and descriptions, set fields as required or optional, and add or remove the built-in user information fields: names, display name, email, password, the address fields and phone. That covers most "do we need the address?" decisions.
What the free plugin does not give you is new kinds of questions. A dropdown of job roles, a checkbox list of interests or a text box for a licence number are custom fields, and they need either the Custom Fields add-on or code. The forms screen itself says so with a "Create Custom Forms and Fields" notice that points to the add-on.
Every extra field costs you some conversions at checkout, and under privacy law every field you store is data you are responsible for. Before adding anything, answer three questions for each field:
Our LifterLMS GDPR and privacy guide covers consent, retention and data export in more detail.
The LifterLMS Custom Fields add-on is the no-code route. Once it is active, the block inserter on the form editor offers extra field types. According to the add-on documentation these include text, textarea, dropdown, checkboxes, radio buttons, number, email, phone number, website URL and an input confirmation field.
The add-on also lets you create extra checkout forms with Add New Form and assign them to particular courses, memberships or access plans. This is the clean way to ask corporate buyers for a company name without putting that question in front of everyone else.
Choose the add-on when site managers need to change questions themselves, or when you need per-product forms. Choose code when the field list is stable and you want it under version control.
LifterLMS has a filter for adding fields to a form programmatically. It receives the list of extra fields and the form location (checkout, registration or account). Each field is an array of settings for the core field class, and fields with a data_store of usermeta are saved to the user's meta automatically when the form is submitted.
This example adds a required job role dropdown and an optional employee number to all three forms. Put it in a small custom plugin, not in a theme that might be replaced.
<?php
/**
* Plugin Name: LLMSX Student Profile Fields
*/
add_filter( 'lifterlms_get_person_fields', 'llmsx_add_person_fields', 10, 2 );
function llmsx_add_person_fields( $fields, $location ) {
$fields[] = array(
'id' => 'llmsx_job_role',
'name' => 'llmsx_job_role',
'type' => 'select',
'label' => __( 'Job role', 'llmsx' ),
'required' => true,
'data_store' => 'usermeta',
'data_store_key' => 'llmsx_job_role',
'options' => array(
'' => __( 'Select your role', 'llmsx' ),
'manager' => __( 'Manager', 'llmsx' ),
'specialist' => __( 'Specialist', 'llmsx' ),
'other' => __( 'Other', 'llmsx' ),
),
);
$fields[] = array(
'id' => 'llmsx_employee_number',
'name' => 'llmsx_employee_number',
'type' => 'text',
'label' => __( 'Employee number', 'llmsx' ),
'description' => __( 'Six digits, found on your staff badge.', 'llmsx' ),
'required' => false,
'data_store' => 'usermeta',
'data_store_key' => 'llmsx_employee_number',
);
return $fields;
}
The fields appear after the fields you placed in the block editor. On the Account form they are pre-filled from the saved user meta, so students can correct their answers later. Text values are sanitised as plain text by the form handler before they are stored.
Required fields are checked for you. For a format rule, hook into the validation filter. Its name depends on the action: lifterlms_user_registration_data for new users and lifterlms_user_update_data for existing users updating their details. Return a WP_Error to stop the submission and show the message on the form.
add_filter( 'lifterlms_user_registration_data', 'llmsx_validate_employee_number', 10, 3 );
add_filter( 'lifterlms_user_update_data', 'llmsx_validate_employee_number', 10, 3 );
function llmsx_validate_employee_number( $valid, $posted_data, $location ) {
if ( is_wp_error( $valid ) || empty( $posted_data['llmsx_employee_number'] ) ) {
return $valid;
}
if ( ! preg_match( '/^\d{6}$/', $posted_data['llmsx_employee_number'] ) ) {
return new WP_Error(
'llmsx_employee_number',
__( 'Your employee number must be six digits.', 'llmsx' )
);
}
return $valid;
}
Use the $location argument if a rule should only apply on one form, such as checkout.
Collected data is only worth something if it is used. Both options above store answers as WordPress user meta, so everything that can read user meta can read them.
The core [llms-user] shortcode prints a field for the logged-in user, with a fallback when it is empty:
Welcome back. Your registered role: [llms-user key="llmsx_job_role" or="not set"]
It works for any user or user meta key except the password, and it only ever shows the current user's own data. It prints the stored value, so for a dropdown you will see the option key, such as manager, not the label. Use readable keys.
Read a value with get_user_meta( $user_id, 'llmsx_job_role', true ). Typical uses are enrolling managers in an extra course after checkout, adding a line to a certificate template, or filtering a custom report.
CRM connectors such as WP Fusion can usually map user meta keys to CRM fields. Automation tools can read it from your own endpoint or a webhook. Note that the LifterLMS REST API does not expose arbitrary user meta on the students route; a developer can add it with register_rest_field() if an integration needs it.
Do not expect custom fields to show up everywhere automatically. The extra LifterLMS section on the WordPress user profile screen shows the core user information fields, such as address and phone, not fields you added yourself. Admins who need to see or edit them should have a small profile field added, or use the add-on's tools if it provides them. Check this before you promise the client "it will be on the user screen".
llmsx_job_role.first_name or llms_billing_city belong to core fields. Prefix yours.Not through the form editor. The free plugin lets you edit the core user information fields. New field types and extra forms come with the Custom Fields add-on, or a developer can add fields with the lifterlms_get_person_fields filter.
In the WordPress user meta table, under the key set for the field. That makes them easy to read with standard WordPress functions and to include in exports.
With the add-on, create a separate form and assign it to those courses or access plans. In code, you would need to detect the product being purchased, which is fiddlier; the add-on is usually the better choice here.
Yes. Fields added with the add-on are stored with the form, and fields added by your own plugin are re-added on every request. Neither is lost when LifterLMS updates.
List the questions you want to ask and, next to each, the report or automation that will use the answer. Delete the ones without a use. Then pick the route: the add-on if non-developers will manage the forms or you need per-product forms, the filter if the list is short and stable.
If the data needs to drive enrollments, certificates, CRM fields or reports, it is worth planning that end to end. Our LifterLMS customization service builds and maintains this kind of form logic, and you can tell us what you need to collect to get a recommendation.
Set up the LifterLMS membership catalog page, choose its sorting and visibility rules, decide whether you need a catalog at all, and customize…
Read article
Which templates LifterLMS adds to the Site Editor, how to design course catalogs, single course and lesson templates in a block theme, what stays in…
Read article
Set up the LifterLMS course catalog page, control sorting, pagination and which courses appear, then customize the course tiles with shortcodes…
Read articleSkip the trial and error. Get specialist LifterLMS help and ship faster.