How could I create/edit, save and display custom dropdown fields at the Post/Reply level

Hi all … can anyone advise of a (good?) way to customise the add/edit-reply behaviour … I am familiar with custom fields and with using plugins, but I don’t see a way to tweak post/reply-specific behaviour.

We are building a network of Discourse sites, connected to & managed through a central “orchestrator” application that (amongst other things) keeps track of content in a bespoke workflow system of sorts. Many Topics will be input-oriented, frequently looking for ideas, inputs, references, introductions, local knowledge, etc. (At this stage we’re trying to work out what’s possible, and will work out what’s desirable once we know that).

For example, one topic might ask for suggestions of people, organisations and companies to invite to a local community regeneration meeting. We’d like to be able to categorise these replies (to feed into the central workflow mentioned earlier).

I know there are UI plugins available to me to customise the Reply area/popup, but I’m not seeing a way to either save the values from these fields into the specific reply(post), or to display them at a per-post level.

See image - I’d like to add 1 or 2 dropdowns to the before-composer-fields area, to save the selected values to the post, and (ideally) to display these at the post level.

I can think of a few hacky ways of getting there … a custom popup that intercepts the Reply action and writes #text into the body of the reply before the user continues, or adding dropdowns to the editor toolbar… but before I examine these further I’d like to rule in/out the option to have, edit, save and display custom fields at the Post/Reply level.

All help much appreciated, thanks!

This is mostly hand-waiving, that can at best send you down the right paths. . . So you’ll need to use add_to_serializer to add the custom fields to the serializer so that you have access to them in Ember. Then you’ll override the front end functions that save the data to include those fields so they get to Rails and it can push them to the custom fields.


That is super, thanks @pfaffman! … knowing it’s possible is half the battle (neither Ruby or Ember is home turf for me). Thanks for such a fast response, also.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.