I code the line like this and it works. The red border shows up.
,but the submit buttons stops working. Somehow submit buttons doesn't work when I reference the model? Is there a reason or solution to this?
Edit:
I found out that I can't use $form->model to check the data because the model remains null up until saving, so I tried to add a parameter in the form method to retrieve the intended model.
I wanted to make a form dynamic by having a red border if the status of a model is false.
I code the line like this and it works. The red border shows up. ,but the submit buttons stops working. Somehow submit buttons doesn't work when I reference the model? Is there a reason or solution to this?
Edit: I found out that I can't use $form->model to check the data because the model remains null up until saving, so I tried to add a parameter in the form method to retrieve the intended model.