Adding an Action to a Form Section?
Have been trying to add an action to form sections but have been unsuccessful, any solutions?
protected function getFormSchema(): array
{
return ([
Section::make('Modify Balance')
->schema([
TextInput::make('bal_subscriberId')->label('Subscriber ID'),
TextInput::make('bal_amount')->label('Amount'),
Checkbox::make('bal_setBalance')->label('Set Balance'),
TextArea::make('bal_description')->label('Description'),
]),
Action::make('updateBalance')
->label('Update Balance')
->action('updateBalance'),
Section::make('Modify Package Limits')
->schema([
TextInput::make('limit_packageId')->label('Package ID'),
TextInput::make('limit_dataBytes')->label('Data Bytes (in bytes)'),
TextInput::make('limit_moCalls')->label('MO Calls (in seconds)'),
TextInput::make('limit_mtCalls')->label('MT Calls (in seconds)'),
TextInput::make('limit_moSms')->label('MO SMS'),
TextInput::make('limit_mtSms')->label('MT SMS'),
TextArea::make('limit_comment')->label('Comment'),
]),
Action::make('modifyPackageLimits')
->label('Modify Package Limits')
->action('modifyPackageLimits')Solution
Run
composer about and see what filament version you are on. You may be on a version before that was introduced.