Line 6: | Line 6: | ||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+ | ||
+ | |||
+ | |||
+ | responseHandler function : | ||
+ | |||
+ | on error : | ||
+ | |||
+ | <code>$responseHandler->setReturnType( HandleResponse::TYPE_ERROR );</code> | ||
+ | |||
+ | <code>$responseHandler->setReturnStatus( "Your general error info" );</code> | ||
+ | |||
+ | <code>$responseHandler->setReturnData( "Details information" );</code> | ||
+ | |||
+ | on success you only have to return true. If you want to add a message that FlexForm should who, then you can do the following : | ||
+ | |||
+ | <code>$responseHandler->setReturnType( HandleResponse::TYPE_SUCCESS);</code> | ||
+ | |||
+ | <code>$responseHandler->setReturnData( "Success information" );</code> | ||
+ | |||
+ | Always return true; | ||
+ | |||
! colspan="2" |<center>BeforeCreateEchoEvent</center> | ! colspan="2" |<center>BeforeCreateEchoEvent</center> | ||
|- | |- |
Revision as of 14:45, 24 May 2022
FFAfterFormHandling hook
When FlexForm is finished processing a submit form and just before it will set notification and return to the user, this Hook will run.
Allowing people to do additional actions with the information submitted by the Form.
function | public static function onFFAfterFormHandling( $formFields, &$responseHandler ) { ... } |
hook | $wgHooks['FFAfterFormHandling'][] = 'MyExtensionHooks::onFFAfterFormHandling'; |
called from | FlexForm/src/Processors/Request/External.php. Method: runHook |