diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index d0ba8ab7..5321646d 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -820,6 +820,18 @@ JS; return FormResponse::respond(); } + /** + * Uses {@link getEditForm()} to retrieve an edit form + * based on the submitted data. Used for form submissions, + * not for template rendering. + * + * @param HTTPRequest $request + * @return Form + */ + function EditForm($request = null) { + return $this->getEditForm($request ? $request->requestVar('ID') : null); + } + /** * Gets the edit form of a specific record. Will usually construct itself * from {@link DataObject->getCMSFields()} for the specific managed subclass