src/Forms/FieldList.php
protected function onBeforeInsert($item)
    {
        $this->flushFieldsCache();

        if ($item->getName()) {
            $this->rootFieldList()->removeByName($item->getName(), true);
        }
    }
protected function onBeforeInsert($item)
    {
        $this->flushFieldsCache();

        if ($item->getName()) {
            $this->rootFieldList()->removeByName($item->getName(), true);
        }
    }
protected function onBeforeInsert ( $ item ) { $ this -> flushFieldsCache ( ) ; if ( $ item -> getName ( ) ) { $ this -> rootFieldList ( ) -> removeByName ( $ item -> getName ( ) , true ) ; } }
Handler method called before the FieldList is going to be manipulated.

@param FormField $item
Handler method called before the FieldList is going to be manipulated .