I'm looking to set up a situation where a user can visit an entry and create a related entry. The original entry will be the parent, the new entry the child.
The issue is the 'related' entry needs to add itself to the parents entry (playa list), so I'll likely need to create a module or something.
The part that has me flummoxed is simply adding the properly formatted inputs to the Channel Data via mySQL etc does not update the playa field & doesn't work.
Yet, if I open up a channel form (parent entry) and add some hidden inputs – when saved, it correctly updates its playa content. So it's only when saving (Channel form) that both the Channel Data and Playa content gets updated.
Imagine this:
- User visits entryA & clicks 'create related entry'
- url = /create/{entry_id} <- Parent entry ID
- Saves channel form (No playa data)
- After it's saved, fire off some 'magic' so it triggers the update to the Parent Entries (entryA) channel data field and also fires an update to the exp_playa table as well - I almost need like an invisible channel form to fire.
If you're still reading: I need some guidance on how to achieve something resembling this and everyone gets a cookie :)