Created
May 15, 2015 17:39
-
-
Save pixel5/e6e3788033309f9161bc to your computer and use it in GitHub Desktop.
Form Example 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function MYMODULE_example_form($form, &$form_state) { | |
$form = array(); | |
$form['name'] = array( | |
'#type' => 'textfield', | |
'#title' => t("Your Name"), | |
); | |
$form['flavor'] = array( | |
'#type' => 'select', | |
'#title' => t("Favorite Flavor"), | |
'#options' => array( | |
0 => t("Vanilla"), | |
1 => t("Chocolate"), | |
2 => t("Aspertame"), | |
), | |
); | |
$form['submit'] = array( | |
'#type' => 'submit', | |
'#value' => t("Submit"), | |
); | |
return $form; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment