<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Forum posts to 'Site Builders'</title>
		<link>http://www.silverstripe.com/site-builders-forum/</link>
		

		
		<item>
			<title>Re: addFieldToTab help</title>
			<link>http://www.silverstripe.com/site-builders-forum/show/51450?showPost=51861</link>
			<description>Hey thanks for the tip.  The fields started working, I'm not sure what I did to get it going; probably something to do with kicking my computer.  &lt;br&gt;&lt;br&gt;Posted to: addFieldToTab help</description>
			<pubDate>Fri, 04 Apr 2008 13:29:04 +1300</pubDate>
			<author> </author>
			<guid>http://www.silverstripe.com/site-builders-forum/show/51450?showPost=51861</guid>
		</item>
		
		<item>
			<title>Re: addFieldToTab help</title>
			<link>http://www.silverstripe.com/site-builders-forum/show/51450?showPost=51516</link>
			<description>[i]What do you do if you want the title in the CMS to say something more descriptive, like &quot;Enter the birth year (yyyy)&quot;...[/i]&lt;br /&gt;&lt;br /&gt;Field types have a second parameter you can use - which is title. By default it just uses the ID (the first argument) but you can override this with a second one so for your example you can have&lt;br /&gt;&lt;br /&gt;new NumericField('BirthYear','Enter the birth year (yyyy)'), 'Content');&lt;br /&gt;&lt;br /&gt;As for the the Pedigree issue - you might want to look at using a HasManyComplexTable field instead of the current setup - http://doc.silverstripe.com/doku.php?id=hasmanycomplextablefield.&lt;br /&gt;&lt;br /&gt;I have no idea why they are not displaying in the cms as it is though..&lt;br /&gt;&lt;br /&gt;[b]EDIT[/b]: typo spotted!&lt;br&gt;&lt;br&gt;Posted to: addFieldToTab help</description>
			<pubDate>Thu, 03 Apr 2008 20:28:20 +1300</pubDate>
			<author>Will Rossiter</author>
			<guid>http://www.silverstripe.com/site-builders-forum/show/51450?showPost=51516</guid>
		</item>
		
		<item>
			<title>addFieldToTab help</title>
			<link>http://www.silverstripe.com/site-builders-forum/show/51450</link>
			<description>I'm working through the tutorials, trying to make a website that would catalog registered horses and cattle with long pedigrees.  I added an AnimalPage that looks like:&lt;br /&gt;&lt;br /&gt;class AnimalPage extends Page {&lt;br /&gt;   static $db = array(&lt;br /&gt;	'BirthYear' =&amp;gt; 'Int',&lt;br /&gt;	'Coloring' =&amp;gt; 'Varchar',&lt;br /&gt;	'Sex' =&amp;gt; 'Varchar',&lt;br /&gt;	'Price' =&amp;gt; 'Currency',&lt;br /&gt;	'Pedigree1' =&amp;gt; 'Varchar',&lt;br /&gt;	'Pedigree2' =&amp;gt; 'Varchar',&lt;br /&gt;	'Pedigree3' =&amp;gt; 'Varchar',&lt;br /&gt;	'Pedigree4' =&amp;gt; 'Varchar',&lt;br /&gt;	'Pedigree5' =&amp;gt; 'Varchar',&lt;br /&gt;	'Pedigree6' =&amp;gt; 'Varchar',&lt;br /&gt;	'Pedigree7' =&amp;gt; 'Varchar',&lt;br /&gt;	'Pedigree8' =&amp;gt; 'Varchar',&lt;br /&gt;	'Pedigree9' =&amp;gt; 'Varchar',&lt;br /&gt;	'Pedigree10' =&amp;gt; 'Varchar',&lt;br /&gt;	'Pedigree11' =&amp;gt; 'Varchar',&lt;br /&gt;	'Pedigree12' =&amp;gt; 'Varchar',&lt;br /&gt;	'Pedigree13' =&amp;gt; 'Varchar',&lt;br /&gt;	'Pedigree14' =&amp;gt; 'Varchar',&lt;br /&gt;	'ShortDescrip' =&amp;gt; 'HTMLText'&lt;br /&gt;   );&lt;br /&gt;&lt;br /&gt;   static $has_one = array(&lt;br /&gt;   );&lt;br /&gt;&lt;br /&gt;function getCMSFields() {&lt;br /&gt;	$fields = parent::getCMSFields();&lt;br /&gt;&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new NumericField('BirthYear'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('Coloring'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('Sex'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new CurrencyField('Price'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('Pedigree1'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('Pedigree2'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('Pedigree3'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('Pedigree4'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('Pedigree5'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('Pedigree6'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('Pedigree7'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('Pedigree8'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('Pedigree9'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('Pedigree10'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('Pedigree11'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('Pedigree12'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('Pedigree13'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('Pedigree14'), 'Content');&lt;br /&gt;   $fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('ShortDescrip'), 'Content');&lt;br /&gt;       	&lt;br /&gt;   return $fields;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class AnimalPage_Controller extends Page_Controller {&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;where $Pedigree# would be one of the animal's pedigree.  I don't understand why only coloring sex and price are working.  Also, in tutorial 2 where they do this, they add Date and Author.  What do you do if you want the title in the CMS to say something more descriptive, like &quot;Enter the birth year (yyyy)&quot;.  I tried &lt;br /&gt;&lt;br /&gt;$fields-&amp;gt;addFieldToTab('Root.Content.Main', new NumericField('BirthYear'), 'Content') -&amp;gt;describe(&quot;Enter the birth year (yyyy)&quot;);&lt;br /&gt;&lt;br /&gt;which returned an error on the describe funtion.  Any help would be appreciated.&lt;br /&gt;&lt;br&gt;&lt;br&gt;Posted to: addFieldToTab help</description>
			<pubDate>Thu, 03 Apr 2008 15:49:14 +1300</pubDate>
			<author> </author>
			<guid>http://www.silverstripe.com/site-builders-forum/show/51450</guid>
		</item>
		

	</channel>
</rss>
