17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 769 Views |
-
adding a HasManyComplexTableField to a popup

17 November 2008 at 6:41am
I need to add a HasManyComplexTableField to a popup block,
Can I do this?
<?php
class Concert extends DataObject{
static $db = array(
"Content" => "Text"
);static $has_one = array(
"Ticket" => "TicketsPage"
);static $has_many = array(
"Seats" => "Seat"
);function getCMSFields_forPopup(){
$fields = new FieldSet();
$fields->push(new TextField( 'Content', 'Content' ));
$tablefield = new HasOneComplexTableField(
$this,
'Seats',
'Seat',
array(
'Content' => 'Content',
'Price' => 'Price'
),
'getCMSFields_forPopup'
);
$tablefield->setAddTitle('Seats');$fields->push($tablefield);
return $fields;
}
}?>
this is my code
| 769 Views | ||
|
Page:
1
|
Go to Top |

