Adding custom fields to Tainacan taxonomy

Hey @AronAmbrosiani, I actually just remembered that we have another way, but it is a bit experimental and certainly need documentation… might be a good opportunity to test it :slight_smile:

We have a “hidden feature”, available for developers, which are Form Hooks. They exist in the Collection, Item, Metadata, Filter, Taxonomy and Terms forms. You can call an action tainacan-register-admin-hooks to hook inside one of the forms and add an extra field to this form. Unfortunately, all we can give you is some code examples by now to show you situations where we did it:

Here is the Tainacan Interface theme, adding a color picker inside the Collection form, to set a tainacan_background_color and a tainacan_text_color value in the collection:

Her is another theme, adding a expanded_filter variable as a “yes/no” option to the Metadata form:

And that same other theme, adding a taxonomy to the Collection Form:

Your code should be actually simpler as you only need a text input. There are other things going on in these examples. If this doesn’t help you enough or if it really doesn’t work at all, let me know. There are two hooks in the Tainacan Taxonomy form: ['taxonomy']['begin-left'] and ['taxonomy']['end-left']'. You may also want to check that form’s source code to get a glimpse of what is going on:

1 curtida