Talk:lib/formslib.php Usage

Revision as of 15:28, 1 April 2016 by Nadav Kavalerchik (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The sample code on this page refers to $fromform:

} else if ($fromform = $mform->get_data()) {

What is $fromform and where is it defined?

Answer: It is defined inside the exact IF you quoted ("$fromform = $mform->get_data()") and it holds all the form's data from the form's page (in to which, the user just entered her/his preferences) Now, it is your responsibility to save it into the $DB