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.

Archive /

Our old forums are still available as a read-only archive.

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

ComplexTableField in Popup


Reply


1429 Views

Avatar
abes

Community Member, 11 Posts

13 November 2008 at 9:38pm

Edited: 13/11/2008 9:39pm

I want to place a ComplexTableField into a tab in a popup. There is a ComplexTableField in the CMS with a list of companies. In the editing popup there is another ComplexTableField with all stores of the selected company. (Perhaps there is a better solution for this?)

   /**
    * Generate fieldset for administration popup.
    */
   function getCMSFields_forPopup ()
   {
      $fields = new FieldSet();
      
      $masterdataTab = new Tab('Stammdaten');
      $storeTab = new Tab('Filialen');
      
      $tabset = new TabSet("Root",
            $masterdataTab,
            $storeTab
      );
      $fields->push( $tabset );
      
      [ ... ]
      
      $storeField = new ComplexTableField(
            $this,
            'Filialen',
            'CompanyStore',
            array(
               'ID' => 'ID',
               'Street' => 'Straße',
               'Zipcode' => 'PLZ',
               'City' => 'Stadt'
            ),
            'getCMSFields_forPopup'
      );

      $storeTab->push( $storeField );
      
      return $fields;
   }

Unfortunately there happens "an error".
There has been an error (I love those error messages^^)

If I place the same ComplexTableField in a tab directly in the cms and not in the popup, it works fine.

Can anybody suggest, where the failure is? Is it not possible to add an ComplexTableField into a popup?