© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•15mo ago•
3 replies
iamnotnaenae

is it possible to get value from parent form with form action modal?

Refer to https://filamentphp.com/docs/3.x/forms/fields/builder#using-get-to-access-parent-field-values

I try with
$form   // *main form
  ->schema
    TextInput::make('first_form_value')
    Forms\Components\Actions([ 
      Forms\Components\Actions\Action::make()  // *second form
        ->form([
          Forms\Components\Actions([
            Forms\Components\Actions\Action::make() // *third form
              ->form([
                 TextInput::make('third_form_value')
              ])
              ->action([ fn(Get $get,Set $set)=>self::setValue($get,$set) ])  // *set main  form value
          ])
        ])
        ->action([
        ])
    ])
$form   // *main form
  ->schema
    TextInput::make('first_form_value')
    Forms\Components\Actions([ 
      Forms\Components\Actions\Action::make()  // *second form
        ->form([
          Forms\Components\Actions([
            Forms\Components\Actions\Action::make() // *third form
              ->form([
                 TextInput::make('third_form_value')
              ])
              ->action([ fn(Get $get,Set $set)=>self::setValue($get,$set) ])  // *set main  form value
          ])
        ])
        ->action([
        ])
    ])

on action that I said set main form value I calling Get,Set and push trough self::function

on self::function I try to get value from third form and set value to first form with

$get('third_form_value')
$set('../../../first_form_value')
$get('third_form_value')
$set('../../../first_form_value')


but the result is when
$get('third_form_value')
$get('third_form_value')
it's show null
then I try
$get()
$get()
it's show value from
second form
second form

I try
$get('../')
$get('../')
it's show value of
second form
second form
and
third form
third form

and either I try
../../
../../
../../../
../../../
or else it's always show
null
null


how can I access value correctly on main , second and third form?
Builder - Form Builder - Filament
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

modal form passing value from the action
FilamentFFilament / ❓┊help
14mo ago
Is it possible to open modal with form fields in hint action?
FilamentFFilament / ❓┊help
3y ago
Pass value from Modal form to Action on list page
FilamentFFilament / ❓┊help
3y ago
Update Form from Action Modal
FilamentFFilament / ❓┊help
2y ago