Working with data from a form
In the form submit handler, look in the form state. The values array will contain submitted values.

So for a form element, 'foo', generated like this:

$form['foo'] = [
  '#type' =&gt; 'textfield',
  '#title' =&gt; t('Foo'),
];


You get the value like this:

function MYMODULE_form_submit($form, &amp;$form_state) {
  $value_of_foo_field = $form_state['values']['foo'];
}