Answer the question
In order to leave comments, you need to log in
Symfony how to make a form field disabled?
if ($order->getProcessed()) {
$editForm = $this->createForm(OrderType::class, $order)->remove('processed');
} else {
$editForm = $this->createForm(OrderType::class, $order);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question