# Customizing create topic form to add more custom fields, what does add\_to\_serializer or register\_custom\_field\_type do?

**URL:** https://meta.discourse.org/t/customizing-create-topic-form-to-add-more-custom-fields-what-does-add-to-serializer-or-register-custom-field-type-do/57774
**Category:** Extras
**Created:** [22 februari 2017 om 10:24 UTC](https://meta.discourse.org/t/customizing-create-topic-form-to-add-more-custom-fields-what-does-add-to-serializer-or-register-custom-field-type-do/57774 "2017-02-22T10:24:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![net\_deamon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/net_deamon/32/70126_2.png) [@net\_deamon](https://meta.discourse.org/u/net_deamon)
#### Post date: [22 februari 2017 om 10:24 UTC](https://meta.discourse.org/t/customizing-create-topic-form-to-add-more-custom-fields-what-does-add-to-serializer-or-register-custom-field-type-do/57774/1 "2017-02-22T10:24:50Z")

</div>

Hi I was looking into customizing create topic form.

1. Removing the category option all together
2. Adding custom field to the form.

Now I was able to add custom field using the plugin outlet composer-fields-below,  
but how to integrate it with topic ? When the user clicks on “+ Create Topic” button, how to save the custom field along with the form?

 ![](https://global.discourse-cdn.com/meta/original/3X/c/c/ccb26375d3f872b587a77c71d5bc4ab1a10c6817.png)

Then I came to know about  
User.register\_custom\_field\_type(‘see\_signatures’, :boolean)  
in [discourse-signatures/plugin.rb at master · xfalcox/discourse-signatures · GitHub](https://github.com/xfalcox/discourse-signatures/blob/master/plugin.rb#L15).

I tried doing  
Topic.register\_custom\_field\_type(‘custom\_field’, :string)  
But no result.

I just dont know how to pass the custom field value to the backend .  
I tried browsing many discourse plugin in github, but could not understand.  
what does add\_to\_serializer or register\_custom\_field\_type do? Can you point me to its documentation?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [23 februari 2017 om 01:13 UTC](https://meta.discourse.org/t/customizing-create-topic-form-to-add-more-custom-fields-what-does-add-to-serializer-or-register-custom-field-type-do/57774/2 "2017-02-23T01:13:38Z")

</div>

This is going to have bad effects on mobile, though if you are removing category and replacing it with another field, there should be room in the UI at least.

---

<div class="post-metadata">

### Author: ![net\_deamon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/net_deamon/32/70126_2.png) [@net\_deamon](https://meta.discourse.org/u/net_deamon)
#### Post date: [23 februari 2017 om 01:47 UTC](https://meta.discourse.org/t/customizing-create-topic-form-to-add-more-custom-fields-what-does-add-to-serializer-or-register-custom-field-type-do/57774/3 "2017-02-23T01:47:22Z")

</div>

I can change the height of create post box to include more custom fields.

But I am not able to figure out how to pass the value from custom field to TopicCustomField.  
I tried browsing many plugins of discourse in github. Discourse-tagging ( depreciated) is the closest one that matches. I have posted snippet of that code in the question, … How do we pass the value from handlebar template to discourse topic?
