How can I make ‘price’ to be recognized as a member of the form?
public static function form(Form $form): Form
{
return $form
->schema([
Wizard::make([
WizardStep::make('First Step')
->schema([
TextInput::make('title')->required(),
FormsComponentsActions::make([
Action::make('Custom Modal')
->button()
->form([
TextInput::make('price')->prefix('$')->required(),
])
]),
WizardStep::make('Second Step')
->schema([
//...
]),
]),
]);
}
when I submit the form it passes this error:
SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘price’ cannot be null.
Generally it doesn’t work for every column that I put in modal.
2
Answers
After testing a lot of ways, Now this is the answer:
I’ve tried to discover the problem. You can try my code out, 100 percent I’m sure.