Skip to main content
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
Source Link
user785179
  • 1k
  • 3
  • 17
  • 28

drupal 7: new field with dynamically generated select list from PHP code

I have a new node type where a user is asked who he or she knows from the site. They are to be presented with a select list with the names of the existing users on the site.

When creating this new select list field in Drupal 7, I noticed that the PHP snippet is gone so I cannot dynamically generate the select list text and values. Is there some Drupal way (Views?) to do this without having to download the CCK (development status) module for Drupal 7? The CCK module is not ready for prime time in Drupal 7. I understand that their rationale to remove PHP snippets are for security reasons (What are the downsides of using PHP Filter code in blocks, nodes, views-args, etc?). The Drupal team would not leave us hanging without this common functionality, right?!??!