Hi Willr,
I have a simmilar problem, because I want to have many forms on a page (without using UDF).
A function e.g.
public function listUsers() { ... } returns a DataObjectSet of Users.
These users are listed on the Page and displayed with jQueryUI Accordion (thats why having 10 forms on the same Page doesnt look bad)
So if I click on a User additional information is shown and I also get a contactform for this user.
The form is a property of the DataObjectSet:
public function listUsers() {
...
foreach ($users AS $user) {
$fieldset = new Fieldset(...);
$actions = new FieldSet(
new FormAction('userContactSend', 'send')
);
$user->contactForm = new Form($this, "what in here?", $fieldset, $actions);
}
}
My problem is the second param of the form-class.
Normally you would have a method in your code that returns this form, like in tutorial 3:
return new Form($this, 'BrowserPollForm', $fields, $actions);
In my case all forms are build within the function listusers().
So, if i fill a form out a form and click "send" i get a blank form and the information is lost.
Hopefully someone has solved this before.