Repeater Items: Disable already added items after form saved in edit mode
Hi guys,
I can't find it in the documention. How can I disable editing of Repeater items after the form has been saved? I want the user only to be able to add & delete items after form save.
Thanks
6 Replies
->visibleOn('edit'). This maybe what youre looking for : Take a look at video 1min 48 sec https://www.google.com/search?q=filament+repeaters&rlz=1C5CHFA_enAU719AU719&oq=filament+repeaters&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIHCAEQABiABDIHCAIQABiABDIHCAMQABiABDIHCAQQABiABDIHCAUQABiABDIHCAYQABiABDIHCAcQABiABDIHCAgQABiABDIKCAkQABiABBiiBNIBCDkwNzhqMGo3qAIAsAIA&sourceid=chrome&ie=UTF-8#fpstate=ive&vld=cid:277e6ee4,vid:f0f90mxXLAg,st:0
Hey @Rotorbit69 , Thanks for your reply. This is sadly not working for my case, what I did now is to wrap all fields in a grid and disabled() the grid based on the created_at hidden field.
->disabledOn('edit')
Why you dont use a custom view to list existing Items and allow only new Items on your Edit form?
Sorry guys I think I did not explained my issue well.
And the title was misleading.
I have a RelationManager in my Tenant view for Orders. In Order Modal I can add OrderItems. What I was looking for is that already added items are disabled (only deletable) in Edit mode.
Thanks for your replies and sorry for the misleading question
Disregard changes? - dehydrated(false) https://filamentphp.com/docs/3.x/forms/advanced#field-hydration