I would really like to see an even simpler field type called 'Plain text' (probably using short values - varchar(255) for now) that we could easily extend for other field type like email, phone, and color to use for storage and default formatters. So rather than implementing all the hooks for each field, it would be nice to be able to do this:

// Note this is an overly simplified verison.
class FieldMail extends FieldPlainText {
  public function getWidgetForm() {
    $form = parent::getWidgetForm();
    $form['value']['#type'] = 'mail';
    return $form;
  }
}

Related:
#1696946: Rename field modules to [type]_field

Comments

Stalski’s picture

Version: 8.x-dev » 9.x-dev

Tagging this for D9.

Personally, I am not sure if we need this most simple field. That said It is open for discussion.

catch’s picture

Version: 9.x-dev » 8.1.x-dev
Issue summary: View changes
Status: Active » Postponed
Issue tags: +Needs issue summary update

Features can be added in minor releases.

swentel’s picture

Status: Postponed » Closed (fixed)
Issue tags: -Needs issue summary update

StringItem is now in core, so I guess we're done here.

Gábor Hojtsy’s picture

Version: 8.1.x-dev » 8.0.x-dev
Status: Closed (fixed) » Closed (duplicate)

Should be duplicate and against 8.0.x, no?