Moodle plugins directory: Associated input | Moodle.org
Associated input
User profile fields ::: profilefield_associated
Maintained by Shamim Rezaie
An associated profile field, associates its value with a core optional profile field.
Latest release:
381 sites
232 downloads
36 fans
Current versions available: 2
Ever wondered how to include a core optional profile field on the signup page? Or how to make that field a required field? Or even how to prevent users from providing a non-unique value for it?
The associated profile field is the answer to your need. You can define an associated profile field and "associate" it with a core profile field.
If this plugin makes your life easier, you can treat me a coffee
Useful links
Contributors
Shamim Rezaie (Lead maintainer)
Please login to view contributors details and/or to contact them
Thank you for your contribution - I'll review it in the next cuple of days.
Tomek
I've tested and code reviewed the plugin. It's written very nicely, well done. I'd say it's good to go to our plugins directory.
As a bonus you could consider:
1. Creating and adding a link to English documentation (e.g. you could use Moodle Docs - https://docs.moodle.org/dev/Plugin_documentation).
2. I think profile_field_associated class has wrong @param classes for $mform passed to the functions - it should be MoodleQuickForm instead of moodleform.
Thank you for your contribution,
Tomek
Other than that, it's a great quick fix for a registration page with more fields.
I'll look into it.
Can you please let me know what Moodle version you are using?
I tried to replicate your scenario but when I accessed /login/signup.php, Moodle said "You cannot create a new account because you are already logged in as firstname lastname".