Does anybody know how to add the remove button in a custom module (field type) with unlimited number of values?
The custom field type has to implement a method which tells whether the field is empty (if the inherited default method is not able to do this).

For example for a numeric field:

NumericItemBase::isEmpty()

  public function isEmpty() {
    if (empty($this-&gt;value) &amp;&amp; (string) $this-&gt;value !== '0') {
      return TRUE;
    }
    return FALSE;
  }