Hello:
Sorry by my bad english.
I newbie in SilverStripe, I learn step by step trough examples and documentation and follow the method: tried-error (or crash).
I have a problem: I need create a form with tables for grouped the members info according your Country.
For example:
US
Member 1...
Member 4...
UK
Member 2...
Member 3
...
I use this code:
-----------
$fields = new FieldSet(
new TabSet( 'Root',
new Tab(_t('MemberAdmin.DATA', 'Data'),
new LiteralField("Title", $title),
$idField,
new HeaderField ($title = $Country[0], $headingLevel = "2"),
$table[0],
new HeaderField ($title = $Country[1], $headingLevel = "2"),
$table[1],
new HeaderField ($title = $Country[2], $headingLevel = "2"),
$table[2]
)
)
);
}
$actions = new FieldSet();
$form = new Form($this, "EditForm", $fields, $actions);
return $form;
-----
But the number of Countries (and consecuence of tables) is variable, I dont know previously if the array of Countries have 10, 20 or 30
Some solution?
Thanks