Different form fields for Edit & Create
Hi folks,
Just wondering how I might go about showing different form fields on an edit and create page.
On the edit page of an Orders Resource I simply display the Delivery and Shipping address using a placeholder field, passing through the Order model. In the create field, obviously I don't have a Order yet and as such want to be able to show a new "relationship manager" or alternatively different fields...How can this be achieved please?
Thanks
5 Replies
->visible(fn($context) => $context === 'create')
Thank you @toeknee π
Is there anywhere in the docs that references this?
you can also use
->visibleOn('edit')
Solution
Ah found it in the docs, cheers guys!
How embarrasing in the "getting started" section too