Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

(solved) Show data after submitting a form

Go to End

4 Posts   1542 Views


Community Member, 19 Posts

17 March 2011 at 12:32am

Edited: 17/03/2011 12:32am


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' >
<% 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()
{ // return the data }

But I think the $_POST - Variable isn't be setted.

Can anyone help me?

Best regards, Beppo


Community Member, 19 Posts

23 March 2011 at 5:19am

Edited: 23/03/2011 5:19am

No ideas how I can solve my problem?

Best regards, Beppo


Community Member, 334 Posts

23 March 2011 at 6:00am

When you are sure the form data is valid, you can save the ID in a session.


If you're looking for a cookieless option, you can also use GET parameters via controller.

Or if a login to your service is required, you can also save the ScriptID & Member::currentUserID() in a DataObject.


Community Member, 19 Posts

29 March 2011 at 7:40am

Thank you very much, now it works :)

Best regards, Beppo