send data from multi step form to another related model.but can't parse the data to other model
here i am trying to send the data from "type" radio button to model called Stages but i also have to send the data from 2nd step to the same model which doesn't work . please help me figure out how can i send the data to stages here is the code bellow for reference. I also did try to add type field in stage 1 and stage 2 (steps 1 and step 2) and add a default value to it but it only takes default value that is 1st assigned.
->steps([
Step::make('type')
->description('Give the category a clear and unique name')
->schema([
Radio::make('type')
->options([
'1' => 'Stage1',
'2' => 'Stage2',])
]),
Step::make('Stage1')
->schema([
Section::make('')
->schema([
TextInput::make('Name')
])->relationship('Stages')]),
Step::make('Stage2')
->schema([
Section::make('')
->schema([
TextInput::make('Name')
])->relationship('Stages')]),
])
0 Replies