A quick note this week on a potentially useful contrib module that’s got me out of a jam. I’ve been trying to find a way to populate a select box on a Drupal webform with a list of node titles. Basically what I wanted was something like an entity reference field for webforms.
One approach to get round this is to use the entity form module, which basically allows you to use entity edit forms in the front end. It’s nice, but it’s a lot of work when you’re working on a perfectly good webform that’s already in existence. Webform also has the advantage of things such as easy to use placeholders and, especially, conditionals. I could also have used the webform view module, but that seems a bit buggy with webform 4.x to me.
I could have written a custom module for this, and indeed that’s what I was about to get down to. Then a quick google along the lines of “drupal webform entity reference”, and the second result was a project called ‘Webform References’, which saved me probably a couple of hours.
Webform references was exactly what I was looking for. It enables you to reference the title of a node, user or a taxonomy term. And that’s all. It’s not a particularly flexible solution as a result, and obviously the webform view module is far more powerful, but for my needs, and hopefully for some others, it is perfect. Based on its download stats, it seems a little underused for such a useful, compact module, so I thought I’d help to get the word out a bit.