SHARE
TWEET

Untitled




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- 1 | Red
- 2 | Blue
- 3 | Green
- /**
- * Implements hook_form_FORM_ID_alter().
- */
- function MODULE_NAME_form_YOUR_FORM_ID_alter(&$form, &$form_state) {
- // Replace the next 5 lines with your logic to set the array of values
- $options = array(
- 1 => 'Red',
- 2 => 'Blue',
- 3 => 'Green',
- );
- $form['FORM_ELEMENT_ID']['#type'] = 'select';
- $form['FORM_ELEMENT_ID']['#options'] = $options;
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.