mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #6150 from open-sausages/pulls/4.0/fix-form-validation-persistence
BUG prevent form data / validation persisting in state when using form schema
This commit is contained in:
commit
369fde2a5b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user