Skip to main content

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'), '#attrinutes''#attributes' => array('placeholder' => 'First Name'), );

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

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

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'), );
Source Link

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

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