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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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


Go to End



Community Member, 70 Posts

10 November 2011 at 7:27pm

Edited: 10/11/2011 7:27pm


I'm trying to use TableField to manage a list of related links to a page. I have the control working, except it isn't saving the id to the db (a hidden field), just the title and url

Is this the right way to be using it? think so. I've been using this: as a guide

some code:

static $has_many = array (
		'Linketys' => 'Linkety',  		

$myTableField = new TableField(
		  'MyTableField', // fieldName
		  'Linkety', // sourceType
		  ), // fieldList
		  ), // fieldTypes
		  null, // filterField (legacy)
		// add some HiddenFields thats saved with each new row
		  'PageID' => $this->ID ? $this->ID : '$RecordID'
		$fields->addFieldToTab("Root.Content.Options", $myTableField);