Wiki

Articles tagged with "required field"X
Displaying 1-1 of 1 result(s).

How to "masquerade" a non-required form element as 'required' one (in the view only)

Created 5 years ago by BoazHow-tos2 comments – viewed 16,142 times – ( +7 / -2 ) – version 1.1
In a nutshell, the task at hand is to mark (or render) a model attribute in the typical "_form.php" view file with the 'required' red asterisk while this attribute is not marked as required in the model's rule() method. If you're interested only in the solution, jump ahead to the 'solution' section below.