Save "edit group field"


I have created a custom plugin for adding fields to the group profile. I am using the table "groups_entity", and want to add some columns to controle the group profile from there. I added a column called "address", and it is possible for me to pull out the data to the group profile.

But my question is: Does someone know, where the trigger for editing the value is? Like edit the group_name?

(I am not interessed in using the profile manager.)

Thank you very much in advance.


  • You are doing the wrong thing.

    • You are not supposed to edit the elgg db structure for such a small requirement.
    • Editing the Elgg Db structure will broke your sites upgrade feature, cause failure for other plugins to work, and can even crash your site and you wont be able to repair it at a later stage.
    • You should use a plugin hook and you can add any number of profile fields to your groups. These values are saved as metadata's on the group and you can fetch them by simple echo $group->metadata_name;
  • Hi Team Webgalli, thanx for your quick reply!!

    The problems is, that I have a list of several hundred groups, that I want to import. And this would much easier when using the groups_entity table, then the metadata table.

    So the problem is not so much the lack of fields, more than the usage of an existing group list. do you have any suggestions to that? And where does the system save the contect of the metadata? Can not find the right table.

  • Import them as Elgg groups with fields as metadatas. You dont need even half of the code for importing them through the Elgg API's.

  • Is it possible for you to explain "with fields as metadata"? where is the metadata stored? You don't have to explain everything, just so I know where to look/google.

  • Since you seem to like playing with and reading the database structure - have a look into the metadata and metastrings table strucures ;) explains all that you could ever want to learn and know about Elgg's metadata ;-)

    That link to the Wiki and the API reference at are for must-read-study if you want to learn to play and code with Elgg.


Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking