How to use Conditional Fields in Controller

I want to add a Author select fields when shared_by === user $form->add( Radios::make() ->name('shared_by') ->label('Author') ->border() ->options( Options::make([ Option::make('anonymous', 'Anonymous'), Option::make('bot', 'Bot'), Option::make('user', 'User'), ]) ) );
I
ifox61d ago
You need Twill 3.1 for conditional fields in the form builder. On your author field, use ->connectedTo('shared_by', 'user')
R
Razvan61d ago
thank you, will try I try it on a input Call to undefined method A17\Twill\Services\Forms\Fields\Input::connectedTo() oh wait i have twill 3.0 yes, it works, thank you very much!
Want results from more Discord servers?
Add your server
More Posts
Block editor preview Vite issue?Hey all, I'm getting this when I preview a page module block editor in the admin:Upgrading from 2.0 to 3.0 -Block Editor $groups issueHello! I'm getting a strange error (see picture). I've tried clearing all caches. It only happens onInline Repeater get's overridden by another InlineRepeater with the same name in another block.The code in first image get's overriden by the code in the second image in admin panel. Normally, whTable custom columnHello! I created module Product and relationship with module Category. I would like to display categMulti select selected issueIn twill3 I created 2 CRUD, ImportedItem and ItemTypes. I used Multiselect for selecting ItemTypes. Upgrading from 2.0 to 3.0 - routing issuesHello! I'm currently updating twill to 3.0 from 2.0, and I'm having some issues with routes. I'm getDisabled defaults in controller based on user RoleGroupI want to disable, create, edit or delete actions according to user RoleGroup or there is another waDrag and drop issueHello, any idea how to achive DnD working on modules list. Problem is in that when you go below limiFile library 404 errorHello, I'm encountering issues with the file library. When I upload a file, such as a .txt file, it'InlineRepeater deleting data on related Model entriesI'm using an InlineRepeater to add relations with pivot data between two Repositories. The relations"astrotomic/laravel-translatable" n+1 queriesI've got a package issue which is composer required by twill. 800+ queries on a model only getting Repeaters and Blockeditor won't work with media library.I saw the pst regarding JSON repeaters. So I switched to the block editor for the content that NEEDS