BUG prevent form data / validation persisting in state when using form schema

This commit is contained in:
Damian Mooyman 2016-09-19 16:46:59 +12:00
parent f2ac6e30aa
commit 82e72d062f
1 changed files with 4 additions and 0 deletions

View File

@ -341,6 +341,10 @@ class LeftAndMain extends Controller implements PermissionProvider {
$data = $this->getSchemaForForm($form);
$response = new HTTPResponse(Convert::raw2json($data));
$response->addHeader('Content-Type', 'application/json');
// Clear non-schema form validation / data / message
// since it does not need to be redirected
$form->clearMessage();
return $response;
}
return null;