Hello,
I think I have an easy problem. My current form looks like this:
Depending on the chosen Dropdown item I want to show the user different data. My code looks like this:
public $SkriptanmeldungenAll;
function doSubmitDruckliste($data, $form) {
//some code
$this->SkriptanmeldungenAll = DataObject::get("Skriptanmeldung","SkriptID = '$SkriptID'");
//...
}
function GetSkriptanmeldungen()
{
return $this->SkriptanmeldungenAll;
}
An the template looks like this:
...
<% control GetSkriptanmeldungen %>
<tr style='height:30px' >
<td>$Nachname</td>
<td>$Vorname</td>
<td></td>
</tr>
<% end_control %>
But if I try to use the button "Anzeigen" no data were shown, because the variable $this->SkriptanmeldungenAll is empty.
What can I do to display the data?
I also tried this way:
function GetSkriptanmeldungen()
{
if($_POST['SkriptID'])
{ // return the data }
}
But I think the $_POST - Variable isn't be setted.
Can anyone help me?
Best regards, Beppo