You are here

public function FlexiformElementUserPass::form in Flexiform 7

Return the form element for this FlexiformElement.

Overrides FlexiformElement::form

File

includes/element/user_pass.element.inc, line 15
Contains class for the User pass element.

Class

FlexiformElementUserPass
Class to add the node title field to a form.

Code

public function form($form, &$form_state, $entity, $language = LANGUAGE_NONE) {
  $parents = $form['#parents'];
  $parents[] = 'pass';
  $form[$this->element_namespace] = array(
    '#type' => 'password_confirm',
    '#parents' => $parents,
    '#title' => $this
      ->label(),
    '#required' => $this->settings['required'],
    '#maxlength' => 255,
  );
  $form = parent::form($form, $form_state, $entity);
  return $form;
}