Deletes a field value
332718
protected function deleteFieldValue()
    {
        $this->controlAccess('field_value_delete');

        if ($this->field_value->delete($this->data_field_value['field_value_id'])) {
            $url = "admin/content/field/value/{$this->data_field['field_id']}";
            $this->redirect($url, $this->text('Field value has been deleted'), 'success');
        }

        $this->redirect('', $this->text('Field value has not been deleted'), 'warning');
    }
448729
public void clearListField(String fieldName) {
		Object val = getFieldValue(fieldName, true); // internal
		if (val instanceof List<?>)
			((List<?>)val).clear();
		else if (val != null && val.getClass().isArray()) {
			DOField fld = getDomainObjectType().getFieldByName(fieldName);
			String ctn = fld.getComponentTypeName();
			Class<?> clazz;
			try {
				clazz = getDomainObjectType().getDomainModel().getClassForName(ctn);
				tryInitListOrArray(null, fld, clazz);
			} catch (ClassNotFoundException e) {
				throw new RuntimeException(e);
			}
		} else {
			if (!getDomainObjectType().getFieldByName(fieldName).isListOrArray())
				throw new RuntimeException("field: [" + fieldName + "] is neither list nor array");
			if (val == null)
				throw new RuntimeException("list or array field: [" + fieldName + "] is null");
		}
	}
924486
def delete(field=nil)
      id ? 
        delete_with_id : 
        field ? 
          self.class.delete_all(field => self[field]) : 
          self.class.delete_all(attributes)
    end
1253202
def clean(self, value):
        
        super_value = super(RichTextField, self).clean(value)

        if super_value in fields.EMPTY_VALUES:
            if self.instance:
                obj_id = self.get_instance_id(self.instance)
                if not obj_id:
                    SourceText.objects.filter(content_type=self.ct, object_id=obj_id, field=self.field_name, processor=self.processor).delete()
                else:
                    SourceText.objects.filter(content_type=self.ct, object_id=obj_id, field=self.field_name).delete()
            self.validate_rendered('')
            return ''

        text = smart_unicode(value)
        if self.instance:
            obj_id = self.get_instance_id(self.instance)
            try:
                if not obj_id:
                    src_text = SourceText(content_type=self.ct, object_id=obj_id, field=self.field_name, processor=self.processor)
                else:
                    src_text = SourceText.objects.get(content_type=self.ct, object_id=obj_id, field=self.field_name)
                assert src_text.processor == self.processor
            except SourceText.DoesNotExist:
                src_text = SourceText(content_type=self.ct, object_id=obj_id, field=self.field_name, processor=self.processor)
            src_text.content = text
            try:
                rendered = src_text.render()
            except ProcessorError, e:
                raise ValidationError(self.error_messages['syntax_error'])
        else:
            # in case of adding new model, instance is not set
            self.instance = src_text = SourceText(
                content_type=self.ct,
                field=self.field_name,
                content=text,
                processor=self.processor
            )
            try:
                rendered = src_text.render()
            except Exception, err:
                raise ValidationError(self.error_messages['syntax_error'])

        self.validate_rendered(rendered)

        if not hasattr(self.model, RICH_FIELDS_SET):
            setattr(self.model, RICH_FIELDS_SET, set())
        getattr(self.model, RICH_FIELDS_SET).add(self.field_name)

        # register the listener that saves the SourceText
        #listener = self.post_save_listener(src_text)
        signals.post_save.connect(receiver=self.post_save_listener, sender=self.model)

        # wrap the text so that we can store the src_text on it
        rendered = UnicodeWrapper(rendered)
        setattr(rendered, self.src_text_attr, src_text)

        return rendered
1050818
function removeFieldsFromObj(data, fieldsToRemove) {
    _.each(fieldsToRemove, function (fieldToRemove) {

        // if field to remove is in the data, just remove it and go to the next one
        if (data[fieldToRemove]) {
            delete data[fieldToRemove];
            return true;
        }

        var fieldParts = fieldToRemove.split('.');
        var fieldPart;
        var dataPointer = data;
        var len = fieldParts.length;
        for (var i = 0; i < len; i++) {
            fieldPart = fieldParts[i];

            // if the field doesn't exist, break out of the loop
            if (!dataPointer[fieldPart]) {
                break;
            }
            // if we are at the end then delete the item from the updatedData
            else if (i === (len - 1)) {
                delete dataPointer[fieldPart];
            }
            // else move the pointer down the object tree and go to the next iteration
            else {
                dataPointer = dataPointer[fieldPart];
            }
        }

        return true;
    });

    return data;
}
833251
def delete_field(field_uri):
  

  root = T.DeleteItemField(
    T.FieldURI(FieldURI=field_uri)
  )

  return root
1118081
def delete(key)
      if exists?(key)
        value = value(key)
        data(key).delete
      end
      value
    end
1249576
def delete_field(self,collection,field_name):
        '''
        
        '''
        if not self.does_field_exist(collection,field_name):
            raise ValueError("Field {} Doesn't Exists in Solr Collection {}".format(field_name,collection))
        else:
            temp = {"delete-field" : { "name":field_name }}
            res, con_info = self.solr.transport.send_request(method='POST',endpoint=self.schema_endpoint,collection=collection, data=json.dumps(temp))
            return res
43885
public function removeField(Field $field)
    {
        if ($this->hasField($field)) {
            unset($this->fields[$field->getName()]);

            return true;
        }

        return false;
    }
534853
def remove(self, value):
		
		try:
			index = self._dict[value]
		except KeyError:
			raise ValueError('Value "%s" is not present.')
		else:
			del self[index]
1168973
public function removeField(Field $field)
    {
        if (($index = array_search($field, $this->fields)) !== false)
            array_splice($this->fields, $index, 1);
    }
829666
public function deleteCustomField(Field $field)
		{
			$form_data = array(
				'fieldname' => $field->getName()
			);
			$this->call('customfielddelete', $form_data);

			return TRUE;
		}
459951
protected function clearValues()
    {
        $this->values = [];
        foreach ($this->fields as $name => $syntax) {
            $this->values[$name] = (object) [
                'value'   => null,
                'error'   => static::MISSING_FIELD
            ];
        }
    }
1065527
def remove_query(field_uid)
      q = ActiveSupport::JSON.decode(@query[:query])
      q.delete(field_uid)
      @query[:query] = ActiveSupport::JSON.encode(q)
      self
    end
737490
public int deleteValue(String property, String value) {
		int count = 0;
		if (has()) {
			Map<String, Object> fieldValues = buildFieldValues(property, value);
			count = getDao().delete(fieldValues);
		}
		return count;
	}
655930
public void delete(ESMapping mapping, Object pkVal, Map<String, Object> esFieldData) {
        if (mapping.get_id() != null) {
            getBulk().add(transportClient.prepareDelete(mapping.get_index(), mapping.get_type(), pkVal.toString()));
            commitBulk();
        } else {
            SearchResponse response = transportClient.prepareSearch(mapping.get_index())
                .setTypes(mapping.get_type())
                .setQuery(QueryBuilders.termQuery(mapping.getPk(), pkVal))
                .setSize(10000)
                .get();
            for (SearchHit hit : response.getHits()) {
                getBulk().add(transportClient.prepareUpdate(mapping.get_index(), mapping.get_type(), hit.getId())
                    .setDoc(esFieldData));
                commitBulk();
            }
        }

    }
389785
function() {
      try {
         // Close previous field
         if(this.fieldValue) {
            this.fieldValue.close();
            this.fieldValue.destroy();
            delete this.fieldValue;
            this.fieldValueWrapper.innerHTML = '';
         }
      
         // Re-build the fieldValue
         var fieldOptions = this.group.getValue();
         
         fieldOptions.type = this.getValue().type;
         fieldOptions.parentEl = this.fieldValueWrapper;
         
         this.fieldValue = inputEx(fieldOptions,this);
      
         // Refire the event when the fieldValue is updated
         this.fieldValue.updatedEvt.subscribe(this.fireUpdatedEvt, this, true);
      }
      catch(ex) {
         console.log("Error while updateFieldValue", ex.message);
      }
   }