Custom Fields for Groups?

Is it possible to create custom fields for Groups, just like we can add (and retrieve) custom fields for Users?

I have seen mention of this as a request here and there (like here).

If it’s not built into Discourse right now (it seems to me it’s not), is there a way to mimic this behavior?

1 Like

You can do this in a plugin.

How would you do it?

eg, in plugin.rb:

Group.register_custom_field_type('my_attribute', :boolean)
Group.preloaded_custom_fields << "my_attribute" if Group.respond_to? :preloaded_custom_fields
3 Likes