by jos cape.
Hi Tony,
The form set up as described in the guide -- http://docs.moodle.org/dev/User:Mark_Johnson/Mforms_and_AJA -- works fine.
It is more or less the standard Moodle form set up, the only difference is using output buffering (ob_get_clean() ) to save the html output and passing back the JavaScript that the form needs (make sure that you get rid of echo $OUTPUT->header(); and echo $OUTPUT->footer(); as well and that nothing else is echoed/output to the page).