CCK values from an external datasource

Events happening in the community are now at Drupal community events on www.drupal.org.
ademarco's picture

In our project we need to have a select box which lets the user choose among a list of items coming from an external data source (XML based webservice). It would be interesting to be able to retrieve the values of a CCK field from an external data source instead to "hardcode" the full list of values. A way to do it could be to specify, in the field setting, the XML end point and an xPath expression to map the values contained in the XML as values of the CCK field.

Any feedback on this?

Comments

You can already specify a

yched's picture

You can already specify a custom PHP function that returns the list of allowed values. In there, you're free to build the list whichever way you see fit.
CCK itself won't hardcode field settings for this specific use case.

Yes that's actually a quick

ademarco's picture

Yes that's actually a quick way to do it, but still, I think there would be room for an external module that add a kind of "values provider" capability for CCK field. What do you think?

Content Construction Kit (CCK)

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: