TextInput to actual value

Hi. Can someone help me?
Is it possible to get working something like below
return $form
            ->schema(
                Wizard::make(
                    function ($record) {
                        $steps = [];
                        // Survey HasMany Categories
                        foreach ($record->categories as $category) {
                            $steps[] = Wizard\Step::make($category->name)
                                ->schema(
                                    function ($record) use ($category) {
                                        $questions = [];
                                        // Category HasMany Questions
                                        foreach ($category->questions as $question) {
                                            $questions[] = Forms\Components\TextInput::make($question->name);
                                            // Question HasMany Answers
                                            foreach ($question->answers as $answer) {
                                                $questions[] = Forms\Components\TextInput::make($answer->name);
                                            }
                                        }
                                        return $questions;
                                    }
                                );
                        }
                        return $steps;
                    }
                ),
            );
Was this page helpful?