We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Make custom fieldtype available in forms

Silvan January 8, 2021 by Silvan

Hi, I've created my own field types and some of them I need to be able to use in form blueprints as well. I found that in vendor/statamic/cms/src/Http/Controllers/CP/Fields/FieldtypesController.php there's a list that defined which fieldTypes are supported in forms:

private function supportedInForms($fieldtype) { return in_array($fieldtype, [ 'assets', 'checkboxes', 'integer', 'radio', 'form_fieldset_title', 'select', 'text', 'textarea', ]); }

How would I go about to make my fieldtype supported in forms as well / override the default supported field types?

>>>>>>> Unanswered <<<<<<<
2 Replies