FilamentF
Filament2y ago
Wim

Different sections on Create and Edit form

I have a form with a grid and 4 sections as follows:
 public static function form(Form $form): Form {
   return $form
     ->schema([
         Grid::make(4)
           ->schema([
              Section::make(__('products.general_info'))
              Section::make(__('products.publish_info'))
              Section::make(__('products.medical_social_info'))
              Section::make(__('products.media'))
      ]);
 }

As it is now all 4 sections are displayed on the create and the edit page. I would want to change it so that section publish_info is only shown on the edit page.
Was this page helpful?