Update docs: Adding Custom Fields to the Registration Page#1429
Update docs: Adding Custom Fields to the Registration Page#1429Apgomeznext wants to merge 7 commits intoopenedx:mainfrom
Conversation
PR: openedx/frontend-app-authn#1595 Restore "Adding Custom Fields to Registration" How-To Guide Context This PR restores the documentation guide for adding custom fields to the registration page in the Authn MFE. This guide was previously removed from the repository, but there is no clear trace of when or why it was deleted from the codebase. The original file is: https://github.com/openedx/frontend-app-authn/blob/63d16364fc2aa6538dd876bd3f6fd5612a20d605/docs/how_tos/adding_custom_fields_to_the_registration.rst#b-add-fields-that-do-not-exist-in-the-user-profile-model Problem The documentation for extending registration fields is currently missing from the repository, making it difficult for operators to: Understand how to add custom fields to the registration page Configure REGISTRATION_EXTRA_FIELDS properly Extend the UserProfile model with custom fields Integrate custom forms with the Authn MFE This documentation is essential for organizations that need to collect additional user information during registration beyond the standard fields (email, username, password, name). Documentation Location The restored documentation is located at: docs/how_tos/adding_custom_fields_to_the_registration.rst Key Topics Covered Introduction to custom registration fields Difference between required and optional fields Step-by-step configuration for existing fields Advanced guide for custom UserProfile field extensions Backend and frontend integration requirements Configuration examples for different deployment methods Testing I followed up the instructions and everything is working as expected
|
Thanks for the pull request, @Apgomeznext! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
|
LGTM thank you so much @Apgomeznext |
sarina
left a comment
There was a problem hiding this comment.
I'm having trouble following this doc. Please ping me when the docs build passes so I can review it more thoroughly as a rendered page. Thanks!
| from the form. | ||
| Method 1: Redefine constants using Django admin and `Site configurations` API. (recommended) | ||
| --------------------------------------------------------------------------------------------- | ||
| #. Go to `Site configurations` in admin: {{LMS}}/admin/site_configuration/siteconfiguration/ |
There was a problem hiding this comment.
In RST, code blocks use two backticks. And paths should also be in code blocks.
| #. Go to `Site configurations` in admin: {{LMS}}/admin/site_configuration/siteconfiguration/ | |
| #. Go to ``Site configurations`` in admin: ``{{LMS}}/admin/site_configuration/siteconfiguration/`` |
|
|
||
| B. Add Fields that Do Not Exist in the User Profile Model | ||
| ========================================================== | ||
| Everything said above in instructions **A** also applies to adding fields that do not exist in the user profile model. This is a more complex task and requires a basic understanding of the Open EdX platform, the concept of plugins, as well as knowledge of the Django framework. However, there are additional actions that you need to perform: |
There was a problem hiding this comment.
You need to add blank lines before and after every #
There was a problem hiding this comment.
Also remember it's "Open edX" not "Open EdX"
| Everything said above in instructions **A** also applies to adding fields that do not exist in the user profile model. This is a more complex task and requires a basic understanding of the Open EdX platform, the concept of plugins, as well as knowledge of the Django framework. However, there are additional actions that you need to perform: | ||
| #. Extend user profile model with new fields. An external plugin can be used for this (recommended). Also user profile model can be expanded inside edx-platform code base (not recommended). `New fields must be migrated to the database.` | ||
| #. Create a form with additional user profile fields and pass the path to this form into `settings`. The form can also be created in the Open edX plugin. `Edx-cookiecutters <https://github.com/openedx/edx-cookiecutters>`_ can be used for the plugin creation. | ||
| #. Additional settings can be passed via `Site configurations` in the LMS admin. This is described in instructions **A**. |
There was a problem hiding this comment.
"instructions A" is not useful and hard to follow. Please title more appropriately and use an internal :ref: link
PR: openedx/frontend-app-authn#1595 Restore "Adding Custom Fields to Registration" How-To Guide Context
This PR restores the documentation guide for adding custom fields to the registration page in the Authn MFE. This guide was previously removed from the repository, but there is no clear trace of when or why it was deleted from the codebase.
The original file is: https://github.com/openedx/frontend-app-authn/blob/63d16364fc2aa6538dd876bd3f6fd5612a20d605/docs/how_tos/adding_custom_fields_to_the_registration.rst#b-add-fields-that-do-not-exist-in-the-user-profile-model
Problem
The documentation for extending registration fields is currently missing from the repository, making it difficult for operators to:
Understand how to add custom fields to the registration page Configure REGISTRATION_EXTRA_FIELDS properly
Extend the UserProfile model with custom fields
Integrate custom forms with the Authn MFE
This documentation is essential for organizations that need to collect additional user information during registration beyond the standard fields (email, username, password, name).
Documentation Location
The restored documentation is located at:
docs/how_tos/adding_custom_fields_to_the_registration.rst
Key Topics Covered
Introduction to custom registration fields
Difference between required and optional fields
Step-by-step configuration for existing fields
Advanced guide for custom UserProfile field extensions Backend and frontend integration requirements
Configuration examples for different deployment methods Testing
I followed up the instructions and everything is working as expected