allowedExtensions = array('jpg', 'gif', 'png'); $actions = new FieldList( new FormAction('addMember', "Add a member with two Files uploaded") ); return new Form($this, "Form", $fields, $actions); } function addMember($data, $form){ $member = new Member(); $form->saveInto($member); $member->write(); $this->redirectBack(); } }