using checkboxes with dependency container
Hi i try to use your checkboxesfield with this package
https://novapackages.com/packages/epartment/nova-dependency-container
but i dont know how to use it together, is it even possible?
using with booleans was easy but, cant find the right value to use..
Hi @Dontorpedo. Are you able to share any code examples of what you are trying to setup please?
right now i use the dependency container like so:
Boolean::make('Print', 'print'),
Boolean::make('ZIP'),
Boolean::make('send per mail?', 'email'),
NovaDependencyContainer::make([
Text::make('Recipient', 'email_to'),
Text::make('Subject', 'email_subject'),
Textarea::make('Nachricht', 'email_message')
])->dependsOnNotEmpty('email', 0),
Boolean::make('Manual invoice', 'manual_invoice'),
then i am also checking in my code like
if ($fields->email == 1) :
i try to replace the booleans with your checkboxes bc. yours is more compact.. ;)
Checkboxes::make('Options')->options([
'print' => 'Print',
'ZIP' => 'ZiP download',
'email' => 'send per mail?',
]),
Thanks @Dontorpedo ... makes sense. You need to change ...
NovaDependencyContainer::make([
Text::make('Recipient', 'email_to'),
Text::make('Subject', 'email_subject'),
Textarea::make('Nachricht', 'email_message')
])->dependsOn('options', 'email'),
´´´´ ->dependsOnNotEmpty('optionen', 'emails', 0),
´´´´
ha, works.. thanks.. but it works only one-way.. unckexng the checkbox doesnt close the element.