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
      })

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.
Was this page helpful?