Adding Custom Fields to the Registration Page

780 views
Skip to first unread message

Natalia Torres

unread,
Apr 19, 2016, 3:16:30 AM4/19/16
to General Open edX discussion
Hi,
I need some extra information about students so I want to extend registration form adding custom fields.
found:

To add custom fields to the registration page, follow these steps.

  1. Start the LMS and sign in to your instance of Open edX.

  2. 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.

    For more information about how to create Django forms, see Django Forms on the Django website.

  3. In the lms.env.json file, add the app for your model to the ADDL_INSTALLED_APPS array.

  4. In the lms.env.json file, set the REGISTRATION_EXTENSION_FORM 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 path.to.the_form.ExampleExtensionForm.

  5. Run database migrations.

  6. Restart the LMS and verify that the new fields appear on your registration form.

But ADDL_INSTALLED_APPS and REGISTRATION_EXTENSION_FORM aren't included on lms.env.json

Regards

Braden MacDonald

unread,
Apr 19, 2016, 3:19:28 PM4/19/16
to edx-...@googlegroups.com
Hi Natalia,

First, make sure you are using a development devstack - this feature was added after the Dogwood release, so is not available in any named release versions.

Second, it's fine if those keys are not currently included in lms.env.json. Just add them in (at the top level).

Example lms.env.json:


     ... (existing settings) ... 
    "ADDL_INSTALLED_APPS": ["myproject.myapp"],
    "REGISTRATION_EXTENSION_FORM": "myproject.myapp.custom_reg_form.RegExtensionForm"
}
 
--
Braden

--
You received this message because you are subscribed to the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/2a65f42e-9cd2-49c7-b9a1-d603a6ec322f%40googlegroups.com.

Message has been deleted

Braden MacDonald

unread,
Sep 9, 2016, 8:50:00 AM9/9/16
to edx-...@googlegroups.com
No, doing it the way I described is not possible in the Cypress version, and we do not recommend using the Cypress version for anything, as it no longer receives security updates.

--
Braden

On Wed, Sep 7, 2016 at 7:19 AM, Sivakumar Sankara Subbu <siva...@teachedison.com> wrote:
Hi Braden,

Is it possible to do this cypress version? Looking forward to hearing from you.

Thanks.

jose rafael velasquez olmos

unread,
Feb 5, 2019, 5:31:27 PM2/5/19
to General Open edX discussion
hi braden what is  ["myproject.myapp"] please help me

Mahyar Damavand

unread,
Feb 6, 2019, 4:02:13 AM2/6/19
to edx-...@googlegroups.com
hi Jose,
That is the application you have to create and is described in step #2:
    2. 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.
    For more information about how to create Django forms, see Django Forms on the Django website.

Reply all
Reply to author
Forward
0 new messages