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

**URL:** <https://meta.discourse.org/t/how-could-i-create-edit-save-and-display-custom-dropdown-fields-at-the-post-reply-level/262278>\
**Category:** Development\
**Created:** [April 19, 2023, 2:27pm UTC](https://meta.discourse.org/t/how-could-i-create-edit-save-and-display-custom-dropdown-fields-at-the-post-reply-level/262278 "2023-04-19T14:27:51Z")\
**Posts on this page:** 4\
**Page:** 1

## AI-generated summary

**Summary**

[SeanOSullivan](/t/-/262278/1) is seeking advice on how to customize the add/edit reply behavior in Discourse to include custom dropdown fields at the Post/Reply level. The goal is to categorize replies and integrate them with a central workflow system. [pfaffman](/t/-/262278/2) suggested using `add_to_serializer` to add custom fields to the serializer, and overriding frontend functions to save the data, allowing it to be pushed to custom fields in Rails. [SeanOSullivan](/t/-/262278/3) expressed gratitude for the guidance, acknowledging that knowing it's possible is a significant step forward.

<div class="post-metadata">

**Author:** ![SeanOSullivan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/seanosullivan/32/93924_2.png) [@SeanOSullivan](https://meta.discourse.org/u/SeanOSullivan)\
**Post date:** [April 19, 2023, 2:27pm UTC](https://meta.discourse.org/t/how-could-i-create-edit-save-and-display-custom-dropdown-fields-at-the-post-reply-level/262278/1 "2023-04-19T14:27:51Z")

</div>

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.

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/0/1/601491364dba3e92418974c3ee46d76da1cce64f.png)

_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!

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [April 19, 2023, 2:36pm UTC](https://meta.discourse.org/t/how-could-i-create-edit-save-and-display-custom-dropdown-fields-at-the-post-reply-level/262278/2 "2023-04-19T14:36:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![SeanOSullivan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/seanosullivan/32/93924_2.png) [@SeanOSullivan](https://meta.discourse.org/u/SeanOSullivan)\
**Post date:** [April 19, 2023, 4:20pm UTC](https://meta.discourse.org/t/how-could-i-create-edit-save-and-display-custom-dropdown-fields-at-the-post-reply-level/262278/3 "2023-04-19T16:20:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [May 19, 2023, 4:20pm UTC](https://meta.discourse.org/t/how-could-i-create-edit-save-and-display-custom-dropdown-fields-at-the-post-reply-level/262278/4 "2023-05-19T16:20:47Z")

</div>

Closed on May 19, 2023, 4:20pm UTC

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