private function addEntry($formdata = [], $data = null, $index = null)
    {
        if (!(!$this->max_entries || count($this->entries) < $this->max_entries)) {
            throw new AssertionError("You cannot have more than max_entries entries in the FieldList");
        }

        if ($index === null) {
            $index = $this->last_index + 1;
        }
        $this->last_index = $index;
        $name = "$this->short_name-$index";
        $id = "$this->id-$index";
        // I feel so dirty... There's gotta be a better way - Deathnerd
        $inner_field_options = $this->inner_field->constructor_options;
        $inner_field_options['meta'] = $this->meta;
        $inner_field_options['prefix'] = $this->prefix;
        $inner_field_options['name'] = $name;
        $inner_field_options['id'] = $id;
        if ($this->inner_field instanceof FormField) {
            $inner_field_options['form_class'] = $this->inner_field->form_class;
            unset($inner_field_options['filters']);
            unset($inner_field_options['validators']);
        }

        /**
         * @var $field Field
         */
        $field = new $this->inner_field($inner_field_options);
        $field->process($formdata, $data);

        $this->entries[] = $field;

        return $field;
    }