[afterStateUpdated with Form Wizard]Change a dependent field value that is present in another step
Hello ,
Is there a way to change a value that is present in a different Step?
Create page(Form Wizard) :
Thanks 🙂
Step::make('Etape 2')
->description('IDENTIFICTION DU SUJET DE THESE')
->schema([
Fieldset::make('IDENTIFICTION DU SUJET DE THESE')
->relationship('these')
->schema([
Select::make('domaine_id')
->label('Domaine')
->reactive()
->options(Domaine::all()->pluck('acronyme', 'id'))
->required()
->afterStateUpdated(function (Closure $set, $state, callable) {
$set('granted_amount', $state);
})
->searchable(),
]),
Step::make('Etap 7')
->description("Montant Octroyé")
->schema([
Fieldset::make('Montant Octroyé')
->relationship('granted_amount')
->schema([
TextInput::make('granted_amount') ->label('Montant Octroyé')
->reactive(),
]),
]),
Step::make('Etape 2')
->description('IDENTIFICTION DU SUJET DE THESE')
->schema([
Fieldset::make('IDENTIFICTION DU SUJET DE THESE')
->relationship('these')
->schema([
Select::make('domaine_id')
->label('Domaine')
->reactive()
->options(Domaine::all()->pluck('acronyme', 'id'))
->required()
->afterStateUpdated(function (Closure $set, $state, callable) {
$set('granted_amount', $state);
})
->searchable(),
]),
Step::make('Etap 7')
->description("Montant Octroyé")
->schema([
Fieldset::make('Montant Octroyé')
->relationship('granted_amount')
->schema([
TextInput::make('granted_amount') ->label('Montant Octroyé')
->reactive(),
]),
]),
1 Reply
Is there any solution for this?