© 2026 Hedgehog Software, LLC
title
type
return $form ->schema([ Select::make('type') ->options(MenuItemTypes::class) ->live() ->disabled(fn (?string $operation) => $operation === 'edit') ->required() ->helperText('Either add a single entry like a recipe or add mulitple options to choose from. This option can\'t be changed once set'), Toggle::make('is_active') ->default(0), TextInput::make('title') ->label(fn (Get $get): string => ($get('type') == MenuItemTypes::OPTIONS) ? 'Options title' : 'Title') ->helperText(fn(Get $get): ?string => ($get('type') == MenuItemTypes::OPTIONS) ? 'e.g. Choose 3 from the following options' : '') ->required() ->maxLength(255), ]);
->label(fn (Get $get): string => ($get('type') == MenuItemTypes::OPTIONS->value) ? 'Options title' : 'Title')