Skip to content

Instantly share code, notes, and snippets.

@greggles
Created September 27, 2011 15:22
Show Gist options
  • Save greggles/1245356 to your computer and use it in GitHub Desktop.
Save greggles/1245356 to your computer and use it in GitHub Desktop.
1290624_example4
<?php
// Assume $arguments can contain any node on the site...
$nodes = node_load_multiple($arguments);
foreach ($nodes as $node) {
$options[$node->nid] = $node->title;
}
$form['test1'] = array(
'#type' => 'select'
'#options' => $options,
);
$form['test2'] = array(
'#type' => 'checkboxes'
'#options' => $options,
);
$form['test3'] = array(
'#type' => 'radios'
'#options' => $options,
);
// Assume this form is rendered out properly ...
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment