Closed bernhardh closed 5 years ago
Hi @bernhardh BY default it is disabled
public $showOnUpdate = false;
public $showOnIndex = false;
However this may not be right for both create and edit. I will have to check that. Is it just for the create form or for both?
Thinking about this however your code
->hideWhenCreating()
->hideWhenUpdating(),
should force this but it doesn't.... hmmm
Ok, I tried it out on another model and there it works, but you will have to add showOnCreation=true as well as default behavior (as long as editing doesn't work).
/**
* Indicates if the element should be shown on the creation view.
*
* @var bool
*/
public $showOnCreation = true;
/**
* Indicates if the element should be shown on the update view.
*
* @var bool
*/
public $showOnUpdate = true;
I'm still having the described problem with another model, but thats probably connected with another package I am using (michielkempen/nova-polymorphic-field).
Just for the records:
https://github.com/michielkempen/nova-polymorphic-field/issues/5
You wrote in your readme, that "The field is disabled in Index and Form views by default" but in my case its shown up in edit mode (aka Form view).
Even if I add the hideWhenCreating/hideWhenUpdating methods.
But on detail view, everything is working: