N
N
NubasLol2018-08-27 14:24:35
symfony
NubasLol, 2018-08-27 14:24:35

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);
        }

Now I'm deleting the checkbox, how can I pass the code so that I just make it uneditable

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BI0R0B0T, 2018-08-29
@BI0R0B0T

Try to just checkbox "disabled"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question