TC
Twill CMS10mo ago
Tom M

Cannot use connectedTo: Cannot unpack array with string keys

Hi I am having issues getting connectedTo to work in my Block. I have Twill 3.1.0 installed, but when I try to use connectedTo I get this error: Cannot unpack array with string keys (View: \vendor\area17\twill\views\partials\form\renderer\block_form.blade.php) This is the code I am using
public function getForm(): Form
{
return Form::make([
Checkbox::make()->name('use_source_description'),
Wysiwyg::make()
->name('source_description')
->connectedTo('use_source_description', true),
Wysiwyg::make()
->name('description')
->connectedTo('use_source_description', false),
]);
}
public function getForm(): Form
{
return Form::make([
Checkbox::make()->name('use_source_description'),
Wysiwyg::make()
->name('source_description')
->connectedTo('use_source_description', true),
Wysiwyg::make()
->name('description')
->connectedTo('use_source_description', false),
]);
}
The code was taken from https://github.com/area17/twill/pull/2323#issue-1869723726 I cannot figure out what I am doing wrong... Any help would be greatly appreciated.
GitHub
Add connected fields support to the Twill 3 form builder by joyceve...
Description This has been reported many times on Discord as missing from the new form builder. Developers were forced to use a BladePartial field to use the @formConnectedField directive or compone...
2 Replies
Tom M
Tom MOP10mo ago
Okay me again, out of curiosity I changed my PHP version from 8.0.11 -> 8.1.13 and it now works without issue. Is PHP 8.0 still being supported? I've just tested on a fresh install, and still not working 🙁 PHP 8.0 Laravel 9.5.2 Twill 3.2.0
ifox
ifox10mo ago
interesting, thanks for reporting @Tom M
Want results from more Discord servers?
Add your server