Aug 27, 2025
0
Level 1
Access multiple properties from a RepeatableEntry in a TextField?
Is the below possible? I'd like to format together the 3 properties into a single textfield. The below is a simplified version of what I'm attempting:
RepeatableEntry::make('presidents')
->state(function $record) {
return [
[
'name' => 'George Washington',
'share' => 25.00,
'custom_id' => 'Georg123',
]
];
})
->schema([
TextEntry::make('name')
->formatStateUsing(fn(Get $get) => "{$get('name')} - {$get('share')} - {$get('custom_id')}")
])
This will render the name, which makes sense because the TextEntry is scoped to the name. But for the life of me, I cannot find a way to gain access to the other fields. I'm going to make my solution work with separate TextFields for each property and format to the best I can, but I'd love to have more flexibility within the single field. Do I need to use a custom entry component here?
Please or to participate in this conversation.