# 扩展现有控制器？

**URL:** https://meta.discourse.org/t/extend-existing-controller/266411
**Category:** Development
**Created:** [2023年五月28日 01:59 UTC](https://meta.discourse.org/t/extend-existing-controller/266411 "2023-05-28T01:59:19Z")
**Posts on this page:** 1
**Showing post:** 17

<div class="post-metadata">

### Author: ![petermarkley](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/petermarkley/32/307825_2.png) [@petermarkley](https://meta.discourse.org/u/petermarkley)
#### Post date: [2023年五月28日 16:37 UTC](https://meta.discourse.org/t/extend-existing-controller/266411/17 "2023-05-28T16:37:08Z")

</div>

> 您还可以在插件中添加用户字段，并控制如何以及是否将这些字段添加到序列化器以显示它们。

这是否包括将它们添加到“创建帐户”模态表单中，并使其成为必填项？您能否为我指出任何有关如何执行此操作的示例或指南？

我已经阅读了您链接的“开发 Discourse 插件”的整个指南。我就是从那里开始的。最终，唯一真正展示如何扩展功能的只是创建[一个带有紫色触手的管理员页面](https://meta.discourse.org/t/developing-discourse-plugins-part-5-add-an-admin-interface/31761)。我已经为我的插件创建了一个可用的管理员页面，但我甚至不确定我是否需要它。它与我目前面临的问题无关，因此他们的示例对我的情况帮助不大。

---

_[View the full topic](https://meta.discourse.org/t/extend-existing-controller/266411)._
