Custom numbering of labels using Builder

Given documentation here: https://filamentphp.com/docs/3.x/forms/fields/builder#numbering-builder-items The only feature available is to have numbering based on every single item or none at all What i want: Numbering based on each type of block Currently: 3 blocks - breakfast - lunch - dinner add a few content blocks:
breakfast 1
lunch 2
dinner 3
breakfast 4
breakfast 1
lunch 2
dinner 3
breakfast 4
Desired outcome:
breakfast 1
lunch 1
dinner 1
breakfast 2
breakfast 1
lunch 1
dinner 1
breakfast 2
Diving into the features blockNumbers method only accepts a boolean or a closure which results in a boolean Is there any way to extend the place where it actually adds the numbers? Not sure wether it happens frontend livewire or it happens serverside Reasoning: i want to give the user a nice overview when all items are collapsed, my application requires the users to add 20 or more blocks of different types and some of the blocks have a required number ( like 16 ) so having a counter next to those will help make it more visible to the user how many they have created
1 Reply
WebKenth
WebKenth10mo ago
To add a visual flair here is my issue: Here i want to add a timeline for a driving school and i want the admin to be able to create items on the timeline and reorder them Since they require X amount of driving lessons it would help alot if the numbering would be per block
No description