[checkbox-field_type] Options Handler throwing error
Created 5 years ago by emergingdzns

So have a checkbox field type defined in my form handler like this:

'participants' => [
            'required' => false,
            'label' => 'Select Participants',
            'type' => 'anomaly.field_type.checkboxes',
            'config' => [
                'mode' => 'checkboxes',
                'handler' => \My\CustomModule\Participation\ParticipantList::class

My Participant List file looks like this:

<?php namespace \My\CustomModule\Participation;

class ParticipantList
    public function handle(CheckboxesFieldType $fieldType)
emergingdzns  —  5 years ago Best Answer

Nevermind. I had to change the container to public function handle(\Anomaly\CheckboxesFieldType\CheckboxesFieldType $fieldType)

ryanthompson  —  5 years ago

You could also use use Anomaly\CheckboxesFieldType\CheckboxesFieldType; but either way ya the class needs to be imported / used in full. Glad you got it!