Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » ManyManyDataObjectManager popup form add to current object

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: 475 Views
  • joern
    Avatar
    Community Member
    28 Posts

    ManyManyDataObjectManager popup form add to current object Link to this post

    Hi,
    I have a many_many (Event -> Images (DataObject with additional Fields) relation and using the ManyManyDataObjectManager to manage it.

    My Scenario:
    I go through the ModalAdmin and set up my new Event.
    In the DataObjectManager I add a new image (through the popup-form) that is then created but not attached to the current event.
    Is there any option to catch the current EventID in the popupform and add it automagically?

    thanks guys!

  • Stef87
    Avatar
    Community Member
    66 Posts

    Re: ManyManyDataObjectManager popup form add to current object Link to this post

    Have you included

       static $has_one = array (
          'Photo' => 'Image'
       );

    in Event? It should automatically add the ID from the photo to the Event table.

    475 Views
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.