Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mottinger's avatar

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?

0 likes
0 replies

Please or to participate in this conversation.