Jump to content

Topic on Talk:HTMLForm/Flow

VolkoV (talkcontribs)

I could only get this to work by changing the first part of the array to $this instead of string with the class name, following the manual of is_callable (http://php.net/manual/de/function.is-callable.php), meaning:

$htmlForm->setSubmitCallback( array( 'SpecialTestForm', 'trySubmit' ) )

should be

$htmlForm->setSubmitCallback( array( $this, 'trySubmit' ) )
Mainframe98 (talkcontribs)

Curious, since the code of the Preferences form uses the first variant, and that works. (source). Is the submit function defined as public static? If it isn't, the first variant won't work.

Reply to "setSubmitCallback"