© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
3 replies
Tjiel

Accessing the state of the repeater from inside the repeater

Hey all, I am currently working on a form that has a repeater somewhat like this:
Repeater::make('questions')
  ->label('Questions')
  ->translateLabel()
  ->relationship()
  ->addActionLabel(__('Add question'))
  ->collapsed()
  ->schema([
    Forms\Components\TextInput::make('name')
      ->label('Question')
      ->translateLabel()
      ->required()
      ->maxLength(255),
    Select::make('required_question')
      ->label('Required question')
      ->translateLabel()
      ->searchable()
      ->options(function (Get $get) {
        $otherQuestions = $get('questions');
        // needs to be questions exluding this one 
        // logic to return data from questions
      })
Repeater::make('questions')
  ->label('Questions')
  ->translateLabel()
  ->relationship()
  ->addActionLabel(__('Add question'))
  ->collapsed()
  ->schema([
    Forms\Components\TextInput::make('name')
      ->label('Question')
      ->translateLabel()
      ->required()
      ->maxLength(255),
    Select::make('required_question')
      ->label('Required question')
      ->translateLabel()
      ->searchable()
      ->options(function (Get $get) {
        $otherQuestions = $get('questions');
        // needs to be questions exluding this one 
        // logic to return data from questions
      })

In the select called required_question I want to reference a different question from the repeater. I was trying to do this by using $get('questions'). But this results just in a null since its looking for a field called 'questions' in the repeater, which obviously does not exist.

So the thing I would like to know is how can i get the values of the other questions as options in my required_question?
Any help would be really appreciated, if there are any questions about my problem im happy to provide answers.
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

Accessing repeater value from outside
FilamentFFilament / ❓┊help
2y ago
Repeater Inside Repeater
FilamentFFilament / ❓┊help
7mo ago
Accessing repeater data
FilamentFFilament / ❓┊help
3y ago
Access to repeater item from inside
FilamentFFilament / ❓┊help
3y ago