PHP Fatal error: Uncaught InvalidArgumentException: Invalid Block type "checkboxes". Must be one of: button, checkbox, datepicker, image, multi_static_select, overflow, plain_text_input, radio_buttons, static_select, plain_text, mrkdwn. in /home/tero/code/ndc/core/vendor/alek13/slack/src/BlockElement.php:62
Stack trace:
#0 /home/tero/code/ndc/core/vendor/alek13/slack/src/Block/Section.php(127): Maknz\Slack\BlockElement::factory()
#1 /home/tero/code/ndc/core/vendor/alek13/slack/src/Payload.php(33): Maknz\Slack\Block\Section->setAccessory()
#2 /home/tero/code/ndc/core/vendor/alek13/slack/src/Payload.php(20): Maknz\Slack\Payload->fillProperties()
#3 /home/tero/code/ndc/core/vendor/alek13/slack/src/Block.php(87): Maknz\Slack\Payload->__construct()
#4 /home/tero/code/ndc/core/vendor/alek13/slack/src/Message.php(407): Maknz\Slack\Block::factory()
#5 /home/tero/code/ndc/core/vendor/alek13/slack/src/Client.php(185): Maknz\Slack\Message->withBlock()
#6 /home/tero/code/ndc/core/classes/Slack.php(71): Maknz\Slack\Client->__call()
#7 /ho in /home/tero/code/ndc/core/vendor/alek13/slack/src/BlockElement.php on line 62
If I change type to checkbox, the error is:
PHP Fatal error: Uncaught Error: Class 'Maknz\Slack\BlockElement\Checkbox' not found in /home/tero/code/ndc/core/vendor/alek13/slack/src/BlockElement.php:67
Is this an issue with the library or is it a problem in my block definition?
I am trying to use Slack Checkboxes accessory with a text field. This is the block definition from Slack's BlockKit page:
I have formatted it to following PHP array structure:
I am using:
to send the message.
I get the following exception:
If I change
type
tocheckbox
, the error is:Is this an issue with the library or is it a problem in my block definition?