This topic describes how to add custom fields to the registration page for your instance of Open edX.
By default, the registration page for each instance of Open edX has fields that ask for information such as a user’s name, country, and highest level of education completed. You can add custom fields to the registration page for your own Open edX instance. These fields can be different types, including text entry fields and drop-down lists.
Before you add a custom field to the registration page, you must make sure that
the combined sign-in and registration form is enabled for your Open edX
instance. To do this, open the
cms.env.json files, and
ENABLE_COMBINED_LOGIN_REGISTRATION feature flag to True. These
files are located one level above the
edx- platform directory.
To add custom fields to the registration page, follow these steps.
Start and sign in to your instance of Open edX.
Use Python to create a Django form that contains the fields that you want to add to the page, and then create a Django model to store the information from the form.
lms.env.json file, add the app for your model to the
lms.env.json file, set the
setting to the path of the Django form that you just created, as a dot-
separated Python string.
For example, if your form is named “ExampleExtensionForm” and is located at
“path/to/the_form.py”, the value of the setting is
Run database migrations.
Restart the LMS and verify that the new fields appear on your registration form.