class TakePaymentPage extends Page
{
// ...
protected function getForms(): array
{
return [
'manualPaymentForm',
'stripePaymentForm',
];
}
public function manualPaymentForm(Form $form): Form
{
return $form
->schema([
Section::make('Manual Payment')
->columns(2)
->schema([
TextInput::make('customer_name')
->label('Customer'),
TextInput::make('customer_email')
->label('Email'),
TextInput::make('reference'),
]),
])
->fill([
'customer_name' => $this->record->customer->fullName(),
'customer_email' => $this->record->customer->email,
])
;
}
}
class TakePaymentPage extends Page
{
// ...
protected function getForms(): array
{
return [
'manualPaymentForm',
'stripePaymentForm',
];
}
public function manualPaymentForm(Form $form): Form
{
return $form
->schema([
Section::make('Manual Payment')
->columns(2)
->schema([
TextInput::make('customer_name')
->label('Customer'),
TextInput::make('customer_email')
->label('Email'),
TextInput::make('reference'),
]),
])
->fill([
'customer_name' => $this->record->customer->fullName(),
'customer_email' => $this->record->customer->email,
])
;
}
}