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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

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

problem in writing function


Go to End


982 Views

Avatar
bebabeba

Community Member, 193 Posts

1 November 2008 at 5:36am

Hi!
I create form using guide. I create 3 function caracterized by forms. Now I want a function Take_all that take the value that this function return (the forms) , add button ad show all the form and the buttun.
What is wrong?This is my code:

function EventoMeeting()
{
$fields1 = new FieldSet( ..... );
$a = new Form($this, 'EventoMeeting', $fields1);
return $a;
}
function InfoMeeting()
{
$fields2 = new FieldSet( ..... );
$a = new Form($this, 'InfoMeeting', $fields2);
return $a;
}

function Take_all($a, $b)
{ $actions = new FieldSet(
new FormAction('doMeeting', 'Send')
return $action_cattura = new Form($this, 'EventoMeeting', 'InfoMeeting', $fields1, $fields2);
);