Removes fields or subfields according to `fieldspec`.

        If a non-control field subfield removal leaves no other subfields,
        delete the field entirely.
178453
def remove(self, fieldspec):
        

        pattern = r'(?P<field>[^.]+)(.(?P<subfield>[^.]+))?'
        match = re.match(pattern, fieldspec)
        if not match:
            return None

        grp = match.groupdict()
        for field in self.get_fields(grp['field']):
            if grp['subfield']:
                updated = []
                for code, value in pairwise(field.subfields):
                    if not code == grp['subfield']:
                        updated += [code, value]
                # if we removed the last subfield entry,
                # remove the whole field, too
                if not updated:
                    self.remove_field(field)
                else:
                    field.subfields = updated
            else:
                # it is a control field
                self.remove_field(field)
469761
def unset_fields(self, fields):
        

        self.mongokat_collection.update_one({"_id": self["_id"]}, {"$unset": {
            f: 1 for f in fields
        }})

        for f in fields:
            if f in self:
                del self[f]
2387
def _trim_fields(self, docs):
        '''
        
        '''
        for doc in docs:
            for field in self._ignore_fields:
                if field in doc:
                    del(doc[field])
        return docs
829666
public function deleteCustomField(Field $field)
		{
			$form_data = array(
				'fieldname' => $field->getName()
			);
			$this->call('customfielddelete', $form_data);

			return TRUE;
		}
1052229
private void filterRelevantFields(List<Field> fields) {
        Iterator<Field> fieldIterator = fields.iterator();

        while (fieldIterator.hasNext()) {
            Field field = fieldIterator.next();
            if (Modifier.isStatic(field.getModifiers())) {
                fieldIterator.remove();
            }
        }
    }
61128
public void removeComponent(Object screenField)
    {   // DO NOT call Object or inherited
        if (m_vScreenField != null) if (screenField != null)
            m_vScreenField.removeElement(screenField);        // Remove this component
    }
596729
def del_fields(self, *names):
        """"""
        cls = type(self)
        self.__class__ = cls
        for n in names:
            # don't raise error if a field is absent
            if isinstance(getattr(cls, n, None), DataField):
                if n in self._field_values:
                    del self._field_values[n]
                delattr(cls, n)
972858
def delete_custom_field(self, custom_field_key):
        """"""
        custom_field_key = quote(custom_field_key, '')
        response = self._delete("/lists/%s/customfields/%s.json" %
                                (self.list_id, custom_field_key))
658363
public void clear()
    {
        _version++;
        if (_version>1000)
        {
            _version=0;
            for (int i=_fields.size();i-->0;)
            {
                Field field=(Field)_fields.get(i);
                if (field!=null)
                    field.clear();
            }
        }
    }
292985
def remove_sort(self, field_name):
        
        self.sorts = [dict(field=value) for field, value in self.sorts if field
                      is not field_name]
88492
def _delete_fields(self):
        
        for key in self._json_dict.keys():
            if not key.startswith("_"):
                delattr(self, key)
        self._json_dict = {}
        self.id = None
        self.name = None
1296348
def clear(self):
        """"""
        for field in self.__privfields__:
            delattr(self, field)
            setattr(self, field, MPI(0))
1105381
def delete_fields(self, form_id, field_ids):
        

        response = self._client.session.delete(
            '{url}/{form_id}/fields/delete'.format(
                url=self.endpoint_url, form_id=form_id
            ),
            params={'fields': field_ids}
        )
        return self.process_response(response)
871726
public void removeComponent(Object screenField)
    {
        if (this.getNextConverter() != null)
        {
            FieldInfo field = this.getField();
            this.getNextConverter().removeComponent(screenField);
            // **START SPECIAL CODE** This code is for a specific special case.
            // This code is for the special case when one converter is used by two SFields
            // I Don't free this converter if there is still an SField pointing to me.
            if (field != null)
            {
                for (int i = 0; ; i++)
                {
                    Object screenField2 = field.getComponent(i);
                    if (!(screenField2 instanceof ScreenComponent))
                        break;      // End of loop
                    if (screenField2 != screenField)
                    {   // Okay, this field has another SField, go through the converters and make sure this one is not referenced.
                        Convert converter = ((ScreenComponent)screenField2).getConverter();
                        while ((converter != null) && (converter != field))
                        {
                            if (converter == this)
                                return;     // DO NOT Free this converter, it is referenced by another ScreenField!
                            if (converter instanceof LinkedConverter)
                                converter = ((LinkedConverter)converter).getNextConverter();
                            else
                                converter = null;
                        }
                    }
                }
            }

        }
        super.removeComponent(screenField);   // delete this
    }
344558
def remove_entry(self, **field_value):
        
        field, value = next(iter(field_value.items()))
        self.data['entries'][:] = [entry
            for entry in self.data.get('entries')
            if entry.get('{}_entry'.format(self.typeof))
            .get(field) != str(value)]
999688
def remove_field(self, path, name):
        
        path = make_path(path)
        container = self.get_container(path)
        try:
            value = container._values[name]
            if isinstance(value, ValueTree):
                raise TypeError()
            del container._values[name]
        except KeyError:
            pass
793756
private void removeField(I_CmsFormField field) {

        String id = field.getId();
        m_fields.remove(id);
        // *not* removing the field id from m_editedFields, because a field of the same id may
        // be added later
        m_fieldsByModelId.remove(field.getModelId(), field);
        field.unbind();
    }