Editing register-form page

how can I edit register-form page with new custom fields? ex. if I want to show/hide some form field depending on value in new custom field ?

Use the search feature in this forum, there are some posts already on this.

forms.py

self.fields[‘your_custom_field’].required=True ### Shows, for hide(False)

could you explain it in more detail?

I mean in html page.

Hi @kottab ,
If you done all correctly like in this post, it should work.


You can find detailed information’s about Django forms on internet, because it’s big issue, in my opinion.
But here some example forms.py

If you done other files correctly, you don’t need to change HTML files, for this processes.

God Luck.

1 Like

thank you very much @qali.

@kottab First of all, I’d be careful with the custom_reg_form plugin: it’s been last updatedc 4 years ago, and that was before the Python 3 upgrade. Thus it is almost certain that it no longer works. If you want to get it to work, I suggest contacting the authors of the original plugin. It looks like they monitor the Github issues, so you could create one there: https://github.com/open-craft/custom-form-app

Alternatively, it was suggested by @nadheemabdulla that you use Murat’s fork, which is known to work with Koa: https://github.com/murat-polat/custom-form-app/

@kottab I guess you already tried all of this? But you did not explain precisely what did not work for you:

  1. What tutor version are you running?
  2. What command is failing?
  3. What are the logs from the failing command?

More generally, refer to the troubleshooting instructions to provide us with more information: https://docs.tutor.overhang.io/troubleshooting.html

1 Like

Everything works fine, but I want the student to be able to modify these assigned values as found on the account settings page. In other words, I would like to retrieve these new custom values on that page(“https://lms.yourdomain/account/settings”) and doing the same things as i do with basic information.

Unfortunately I don’t think I’m going to be able to help you here. As far as I understand, the list of fields that are present in account/settings are hardcoded in the account_settings_factory.js file and the account_settings view from user_api/accounts/settings_view.py module. So you would have to manually modify these files in order to get the changes you need in the account settings form.

An alternative solution would be to get the account microfrontend to work with Tutor. I am not sure this would resolve your problem though; it’s just that I know that edX is mostly focused on migrating all account pages to the microfrontend and the current accounts app from edx-platform probably receives little attention.

Thanks for the clarification, what do I need to do this does that require modification in these two files only or are there other files that I have to modify in them.