Jump to:

7939 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » nested fieldset problem in popup ?

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 1009 Views
  • Artyom
    Community Member
    22 Posts

    nested fieldset problem in popup ? Link to this post

    The following code produces this error in the popup

    Uncaught Exception: Object->__call(): the method 'name' does not exist on 'FieldSet

    It started when I added the IsSeparator bit with the second SelectionGroup. Can the code not handle neste fieldsets or ?


    class ScheduleItem extends DataObject {

       static $linkValues = array(
          'None'       => 'none',
          'Events'   => 'Workshops & Events',
          'LevelOne'   => 'Level I',
          'LevelTwo'   => 'Level II',
          'Specified'   => '(specified)'

       static $db = array(
          'IsSeperator'   => 'Boolean',
          'Date'       => 'Text',
          'Title'    => 'Text',
          'Byline'    => 'Text',
          'Presenter' => 'Text',
          'Time'       => 'Text',
          'Venue'    => 'Text',
          'LinkType'    => "Enum('None, Events, LevelOne, LevelTwo, Specified', 'None')",
          'SpecifiedLink'       => 'Varchar(150)',
          'IsFeaturedEvent'       => 'Boolean'
       static $has_one = array(
          'SchedulePage' => 'SchedulePage'
       static $defauls = array (
          'IsSeperator' => false
       static $singular_name = 'Schedule Entry';
       static $plural_name = 'Schedule Entries';
       function getCMSFields_forPopup() {
          $fields = new FieldSet(
             new SelectionGroup(
                   '1//Seperator Bar' => new HiddenField(""),      
                   '0//Event' => new FieldSet (
                      new TextField('Date'),
                      new TextField('Title'),
                      new TextField('Byline'),
                      new TextField('Presenter'),
                      new TextField('Time'),
                      new TextField('Venue'),
                      new SelectionGroup(
                            "None//No Link" => new HiddenField(""),
                            "Events//Workshops & Events" => new HiddenField(""),
                            "LevelOne//Level I" => new HiddenField(""),
                            "LevelTwo//Level II" => new HiddenField(""),
                            "Specified//Specify a link" => new TextField('SpecifiedLink', 'Fully specified URL (eg, "http://mysite.com/event.html"')
                      new CheckboxField ("IsFeaturedEvent", "Show on homepage")
          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.