mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-09-06 01:31:09 +02:00
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:
parent
d0e6bdfd2c
commit
cf1e205bc6
@ -537,9 +537,10 @@ HTML;
|
|||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
function createRecord() {
|
function createRecord($data, $form) {
|
||||||
$baseClass = $this->stat('data_type');
|
$baseClass = $this->stat('data_type');
|
||||||
$obj = new $baseClass();
|
$obj = new $baseClass();
|
||||||
|
$form->saveInto($obj);
|
||||||
$obj->write();
|
$obj->write();
|
||||||
|
|
||||||
$editForm = $this->getEditForm($obj->ID);
|
$editForm = $this->getEditForm($obj->ID);
|
||||||
|
Loading…
Reference in New Issue
Block a user