Get error array after mform validation

Re: Get error array after mform validation

by Nicolas Martignoni -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Tim Hunt and Paul Holden gave me the answer on the dev chat. Warm thanks to both of you!

Solution: just respect the basic usage for mforms, specifically call "display()" after "get_data()". Then the errors get displayed automatically.

See https://docs.moodle.org/dev/lib/formslib.php_Usage, especially section "Basic Usage in A Normal Page".