How does IEF store data? / AJAX altering IEF edit form

Created on 10 February 2021, almost 4 years ago
Updated 29 June 2023, over 1 year ago

I'm trying to wrap my head around how IEF works, and it's not quite getting there.

I've got a client request for a complex IEF reference to be updated with an AJAX call while editing a node. So, if the user changes a "Color" field pull down, an AJAX call should be made that swaps out the IEF "Colour Images" field to a computed value. Note that this shouldn't replace it with an open IEF form, but rather the container/fieldset reference that allows you to only edit or remove.

I've got the AJAX working - the HTML is swapped out, but when I go to hit the Edit button, the old reference shows up.

I've tried digging deep into how IEF determines which node reference to open. How does it know which entity reference to open? (Is it stored in $form, or $form_state, somewhere in its own AJAX request, or elsewhere?). Is it something that can be overwritten programmatically?

Even just a starting "look here" would be super helpful here. Thanks in advance.

💬 Support request
Status

Active

Component

Code

Created by

🇨🇦Canada TrevorBradley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024