Skip to content

Instantly share code, notes, and snippets.

@yyfrankyy
yyfrankyy / download_untar.sh
Created December 29, 2011 08:52
download from github's private repo
curl -sLk --user {username}:{password} https://github.com/{username}/{repo}/tarball/{tagname} | tar -xzf -

Munge a form field into a multiple select (and back!)

This is a sample Drupal module that modifies an existing form field to display it as a multiple select without having to modify the handling code. As far as the form's "owner" is concerned, the user enters a comma-separated list of values.

The goal is, as you can probably tell from the $form_id, to turn a profile field into a multiple select of values from elsewhere. This is probably less than ideal, but I can't figure out a better way to achieve this.