Hi I was looking into customizing create topic form.
- Removing the category option all together
- 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?
Then I came to know about
User.register_custom_field_type(‘see_signatures’, :boolean)
in 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?