Ever wanted to have a CCK field that fetches data from an external source and displays it? Something like node or user reference but for external data? Yep, we've all (probably) been there.
I managed to put together something that lets me fish data from our internal API (which supplies many of our services with miscellaneous data from resources to domain location), store it in Drupal and output it using additional data from the API if using more advanced formatters.
I'm having one of those grin on your face moments ATM. Enjoying it while it lasts so to speak before the herds descend to test every nitty gritty of it.
Step 1: Empty resources field
Step 2: choosing a resource from a set returned by the API
Step 3: updated field based on selection made in step 3
Step 4: output on a page
If you want to achieve something similar, here's a hint - I got my ideas from filefiled/filefield_sources/




It's quiet in here! Why not leave a response?
Leave a Response