Retrieving data from registration page custom field

*Hi Team,

Is there any possible way to retrieve data from the database that has been stored by custom field of registration page.
*

1 Like

Hi, there are a couple different methods of implementing “custom fields” on the registration page - which did you use?

If you used the REGISTRATION_EXTENSION_FORM method with a custom form app like the example, then your data will be stored in a Django model in MySQL, and you can use any standard Django QuerySet API or MySQL query to retrieve it.

Using this example, you would do something like:

from custom_reg_form.models import ExtraInfo

for e in ExtraInfo.objects.all():
    print(f"{e.user.username} prefers to use {e.favorite_editor}")
1 Like

hi, same question how to retrieve it in profile?

@braden Thanks for the response.

Is it possible to include it on the profile or grade report?

1 Like

Not easily, as far as I know. You’ll have to create a customized version of the profile or grade report UI. It would be a nice contribution if someone made it easier to do this.

1 Like

I used this fork of your custom reg app: GitHub - murat-polat/custom-form-app: An example app that can be used as a template for extending the registration form in the OpenEdx LMS.

Where does one put that Django QuerySet API into open edx in order to run that sort of query? (I really just want a CSV output of the registration form field so maybe I’m better off using mysql?)

What you’re doing here in the Django admin looks great to me - is that not working?

OK, I hadn’t looked at that beyond just changing “phone_number” to something else. Where does that download option actually appear then?

I’m not sure of the exact URL, probably something like /admin/custom_reg_form/extrainfo/ . You can always go to /admin/ and search for “extra” and it should show up. Then look for a link on that page called “Download CSV” or “Actions”

There’s no hits in the Django admin page for either “extra” or “custom_reg_form”. Also neither /admin/custom_reg_form/ nor /admin/custom_reg_form/extrainfo/ exist.

@murat-polat Is your variant of the plugin supposed to have an export interface somewhere?