seetakanta
seetakanta
FFilament
Created by seetakanta on 10/5/2023 in #❓┊help
how you render button without click it
public function getActions(): array { $formFilled = $this->isFormFilled(); return [ Actions\CreateAction::make() ->label('Generate from ChatGPT') ->action(fn () => $this->fillFormFields1()) ->disabled($formFilled) ->color($formFilled ? 'success' : 'secondary') // ->color('success') ->outlined() ]; } protected function isFormFilled(): bool { $requiredFields = ['type', 'difficulty_level']; foreach ($requiredFields as $field) { if (empty($this->data[$field])) { return false; } } // $again=$this->make(); return true; } This is my code write in filament/resources/materialresources/page/creatematerial.php file i want when two fill are fillup then the button color will change so i write this logic but when i fill the field then color was not change but after fill the field when i click on button then only the color was change. so i try to fix it can you help me in it
5 replies
FFilament
Created by seetakanta on 10/4/2023 in #❓┊help
how add css property in action button in resources/createpage
this is my code Actions\CreateAction::make() ->label('Generate from ChatGPT') how i will add css float:right in this button
11 replies
FFilament
Created by seetakanta on 10/4/2023 in #❓┊help
Actions\CreateAction::make() ->label('Generate from ChatGPT')
how i add css float:right in this button
1 replies