public function doSave($data, $form)
    {
        $recordType = $this->getRecordType();
        $record = $recordType::create();
        $form->saveInto($record);
        $record->write();
        $this->redirect($this->Link());
    }
public function doSave($data, $form)
    {
        $recordType = $this->getRecordType();
        $record = $recordType::create();
        $form->saveInto($record);
        $record->write();
        $this->redirect($this->Link());
    }
public function doSave ( $ data , $ form ) { $ recordType = $ this -> getRecordType ( ) ; $ record = $ recordType :: create ( ) ; $ form -> saveInto ( $ record ) ; $ record -> write ( ) ; $ this -> redirect ( $ this -> Link ( ) ) ; }
Function for saving the form
Function for saving the form