I follow the sample at https://docs.moodle.org/dev/Form_API
However i when i $this->add_action_buttons(true, 'submit'); and submit the form with submit button, it does not $mform->getdata() or reaching cancel inside nested block. It only redirects to the empty /view.php.
The function inside locallib initiate moodleform class, and displaying everything untill i click submit.
What am i doing wrong?