#$get() not finding fields

6 messages · Page 1 of 1 (latest)

daring tree
#

Good morning, I have a filament form in a modal on a custom livewire page. I have a select field which is dependent on another select field. Nothing crazy, just use GET $get()... Atleast that's what I thought.
Because its appearing to not find those fields for some reason. But I have no Idea what's going wrong.
It is finding the "answer" field outside of the FieldSection, but all the fields within are simply nowhere to be seen.

Repeater::make($step . '.answers')
->reorderable(false)
->hiddenLabel()
->minItems(1)
->schema([
    TextInput::make('answer')
        ->required(),
 Fieldset::make('Filter (Not required)')
->columns(3)
->schema([
    Select::make('attributes')
        ->searchable()
        ->columnSpan(1)
        ->native(false)
        ->options($productAttributes)
        ->live(),
    Select::make('operator')
        ->columnSpan(1)
        ->native(false)
        ->options(FilterOperators::get()),
    Select::make('attributeValues')
        ->searchable()
        ->columnSpan(1)
        ->native(false)
        ->multiple()
        ->options(function (Get $get) use ($productAttributes) {
            $attribute = $get('attributes');
            dd($get());
            if (!$attribute) {
                return ['' => 'no-attribute'];
            }

            $options = app(GetSiteProductAttributesValues::class)(
site: SiteTenant::current() 
attribute: $attribute);
            
dd($get(), $options, $attribute, $productAttributes);
return $options;
   }),
]),
ashen kilnBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

daring tree
slim finch
#

ah nvm it's the formatting that makes it look like that

daring tree
#

I somehow got this to work using a repeater instead of a fieldset