gridField = $gridField; $this->id = $id; $this->link = $link; parent::__construct(); } public function Link($action = null) { return $this->link; } public function showform() { return "" . SSViewer::get_base_tag("") . "" . $this->Form()->forTemplate(); } public function Form() { /** @skipUpgrade */ return new Form( $this, Form::DEFAULT_NAME, new FieldList( new TextField("Test") ), new FieldList( new FormAction('doAction', 'Go') ) ); } public function doAction($data, $form) { return "Submitted " . $data['Test'] . " to item #" . $this->id; } public function testpage() { return "Test page for item #" . $this->id; } }