I have created at a plugin to add some custom fields in the registration form. Some of these fields are dropdowns (<select>... <option></option> ......</select>) . But I'm not sure how to display these new fields into the "Profile" tab so users can change them later. Any ideas how I can add them to the profile tab?
I've already tried following this: https://elgg.org/discussion/view/2691988/custom-profile-fields-best-use#elgg-object-2694901 to remove the defaults ones and add the new ones, but was not able to add the values with dropdowns.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Jerome Bakker@jeabakker
Jerome Bakker - 1 like
- Ivan@ivseverino
Ivan - 0 likes
- Jerome Bakker@jeabakker
Jerome Bakker - 2 likes
- Ivan@ivseverino
Ivan - 0 likes
- Ivan@ivseverino
Ivan - 0 likes
You must log in to post replies.Why not use Profile Manager, as this plugin is made for this purpose
@jerome Very nice plugin, it seems to do most I need. I however am looking to do it in a more programatically way, so when I move to the production server I don't have to run the fields setup again, and neither other developers when installing it locally. You know if there's any way to setup this plugin programatically?
There is no way to do it programatically, however you can export the field config and import it on another site. So that's a thing
Thanks @jerome ! I'll keep this idea as backup. The reason why I'm not using it just yet is that in this project, a specific user type has to have some fields available, and other user types have a different sets available, and in the registration form we are "hiding" and "showing" fields depending on selection. So in order do manage this part I think is easier to keep the project's own plugin idea for now.
The main problem I'm facing now is just to extend somehow profile to just show a 'dropdown' type. Open to more suggestions or ways to approach this. Thanks!
Ok, I thought of posting an update in case the information is useful to someone. The way I solved this was by creating a custom input type under "view/default/input/mycustomtype.php" with the <options> I needed. Then i just specified the type of input as "mycustomtype" when needed, or called it through elgg_view('input/mycustomtype').