add feature that a creation form with fields in it will create the new record with those field value

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@50247 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Normann Lou 2008-02-26 23:19:05 +00:00
parent d0e6bdfd2c
commit cf1e205bc6

View File

@ -537,9 +537,10 @@ HTML;
*
* @return String
*/
function createRecord() {
function createRecord($data, $form) {
$baseClass = $this->stat('data_type');
$obj = new $baseClass();
$form->saveInto($obj);
$obj->write();
$editForm = $this->getEditForm($obj->ID);