Been following this as I've been trying to make pet bios as well, haha...I tried to follow your steps, Kyttias, but as usual for some reason it hates me and will not display anything, and when trying to edit (by going to .../myadopts/editbio/ID) I get this error;
You specified an invalid action that cannot be completed.
I followed steps 1 through 5 exactly (wanted to get them displaying before worrying about the report function)
I added;
PHP Code:
public function editbio(){
$mysidia = Registry::get("mysidia");
$adopt = $this->getField("adopt");
$image = $this->getField("image");
$document = $this->document;
if($mysidia->input->post("submit")){
$document->setTitle("Biography Field Updated");
$document->add($image);
$document->add(new Comment("<br/>You've successfully modified {$adopt->getName()}'s biography. <br/> Would you like to <a href='../../myadopts/manage/{$adopt->getAdoptID()}'>continue to manage</a> {$adopt->getName()} or <a href='../../levelup/click/{$adopt->getAdoptID()}'>view their profile</a>?"));
return;
}
$document->setTitle("Biography of ".$adopt->getName());
$document->add($image);
$document->addLangvar("<br/>Write a little something about {$adopt->getName()}! Keep it under 1500 characters.<br/>");
$editBioForm = new FormBuilder("editbioform", "", "post");
$editBioForm->buildTextArea("adoptsbio", $value="{$adopt->getPetBio()}")->buildButton("Edit Bio", "submit", "submit");
$document->add($editBioForm);
}
To the bottom of the file in myadoptsview.php (before the closing view bracket and PHP tag)...could the error have to do with placement..?