[ 'type' => 'text', 'label' => 'Flavour', 'required' => true, ], ]; } /** * Available params: * @param $data array The form data * @param $files array The uploaded files * @param $entry mixed|null The Pilot entry ID to execute the action for * @param $entries array The Pilot entries ID to execute the action for */ public function handle(array $data) { if ($data['flavour'] === 'mayonnaise') { return $this->error('Please choose a better flavour'); } // ... return $this->action( type: 'info', title: 'Smoothie', message: 'Your smoothie is ready!' ); } }