Jump to:

5542 Posts in 1739 Topics by 1225 members

Customising the CMS

SilverStripe Forums » Customising the CMS » ComplexTableField content

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

Page: 1
Go to End
Author Topic: 368 Views
  • Paco728
    Community Member
    28 Posts

    ComplexTableField content Link to this post

    Hello everyone. I have a question, I know how I have to do that when I add data in a table does not add inches to the other pages too, meaning that each record is displayed only in that table. Thank you very much, I leave the code:


    class NuevoEquipo extends NuevaZona {

    static $db = array(

    static $has_many = array(
    'MiEquipo' => 'Equipos'

    function getCMSFields() {
    $fields = parent::getCMSFields();

    $playersTablefield = new HasManyComplexTableField(
    'Nombre' => 'Nombre'
    $playersTablefield->setAddTitle( 'jugador' );

    $fields->addFieldToTab( 'Root.Content.Estadisticas', $playersTablefield );

    return $fields;


    class NuevoEquipo_Controller extends NuevaZona_Controller {
    public static $allowed_actions = array (


    class Equipos extends DataObject {

    static $db = array(
    'Nombre' => 'text'

    static $has_one = array(
    'Teams' => 'NuevoEquipo'

    function getCMSFields_forPopup() {
    $fields = new FieldSet();
    $fields->push( new TextField( 'Nombre' ) );
    return $fields;


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.