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.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

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

ManyManyDataObjectManager popup form add to current object


Reply

2 Posts   486 Views

Avatar
joern

7 August 2012 at 10:30pm Community Member, 28 Posts

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!

Avatar
Stef87

25 August 2012 at 1:32am (Last edited: 25 August 2012 1:32am), Community Member, 66 Posts

Have you included

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

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