[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) :
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(),

]),
]),
Thanks 🙂
1 Reply
Arjan
Arjan3mo ago
Is there any solution for this?
Want results from more Discord servers?
Add your server