Hide relation manager based on state of form field
Does anyone know how to show/hide a relation manager based on the state of a form field? I could only find info on doing it based on the model (
canViewForRecord
).
Cheers2 Replies
I don't think this is supported as it would require rerendering the relation managers on form changes
You could send an event to the RM to update the status and store it in a property
I ended up using an
isVisible
property on the relation manager that I set using an event dispatched from the form. And a custom view with the table wrapped in @if($isVisible)