is there any chance to disable an field to user using EasyAdmin's implemented fields?
I would like to show to user a boolean value of isPaid
, but i don't want him to change it, just show him (the payment gateway does this)
is there any chance to disable an field to user using EasyAdmin's implemented fields?
I would like to show to user a boolean value of isPaid
, but i don't want him to change it, just show him (the payment gateway does this)
What you are probably looking for is this:
BooleanField::new('isPaid')->setFormTypeOption('disabled','disabled');
Actually all i needed and wanted is this:
public function configureFields(string $pageName): iterable
{
...
$isPaid = BooleanField::new('isPaid')->renderAsSwitch(false)->hideOnForm();
...
}