June 2, 2009

Drupal Module of the Week: Prepoulate

Prepopulate is a handy module for auto filling fields on a node creation page with values from the url. This way you can provide 'content creation' links on your Drupal site, pre populated with things like taxonomy terms, profile data, etc...

In our case we have a client that wanted a user to be able to submit a preformatted letter to a third party outside of the site with selected profile information attached. Within the users profile we've provided a link to the create node and have passed a bunch of the users data along in the url. All the user then has to do is make edits where needed and hit send. A pretty painless way of getting Drupal to do what we want. Don't forget you're limited to the maximum size of the URL so it's great for text fields and options, not so much for passing around blog posts and definitely not for files.

It works on the title and body fields of nodes as well as any text/numeric fields in CCK. There is some talk of incorporating POST support so if you're handy with that sort of thing head to the issue queue and help them out.