How do I use an HTML5 element for my field widget?
Your question is not clear please explain what HTML5 element you want to add to the form field. If you want to add placeholder or any other element you can pass them in #attributes, like this:


$form['name'] = array(
  '#type' => 'textfield',
  '#title' => t('First Name'),
  '#attributes' => array('placeholder' => 'First Name'),
);