Manage single specific field functions:
 **************************************************************************
 Text.
351091
def update_db_post_field_text(db_post_field, content, post_field_parent = nil)
      db_post_field.update(
        meta_datas: {
          label: content[:label] && !content[:label].blank? ? content[:label] : db_post_field.key,
          class: content[:class] && !content[:class].blank? ? content[:class] : nil
        }
      )
    end
373989
function(fields, data) {
    if (!_.isString(fields)) {
      return data;
    }

    // If a field is specified as `foo.bar` or `foo.bar.baz`,
    // Convert it to just `foo`
    var map = {};
    _.forEach(fields.split(','), function(field) {
      map[field.split('.')[0]] = 1;
    });

    var keys = _.keys(map);
    if (_.isArray(data)) {
      data = _.map(data, function(object) {
        return _.pick(object, keys);
      });
    } else if (_.isObject(data)) {
      data = _.pick(data, keys);
    }

    return data;
  }
1143606
function(apiKey, contactId, fromName,
        fromAddress, toAddress, ccAddresses, bccAddresses, contentType,
        subject, htmlBody, textBody, header, receivedDate, sentDate,
        emailSentType) {}
1219431
def set_text(self, text):
        ''''''
        if text in [None, ""]:
            return self.jsonrpc.clearTextField(self.selector)  # TODO no return
        else:
            return self.jsonrpc.setText(self.selector, text)
222151
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, MESSAGE_INFO_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, MESSAGE_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, MESSAGE_STATUS_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, MESSAGE_TRANSPORT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, MESSAGE_PROCESS_INFO_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CONTACT_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CONTACT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, DESCRIPTION, 60, null, null);
        field = new FieldInfo(this, MESSAGE_TIME, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, TIMEOUT_SECONDS, 10, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, TIMEOUT_TIME, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, USER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, REFERENCE_TYPE, 60, null, null);
        field = new FieldInfo(this, REFERENCE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, RESPONSE_MESSAGE_LOG_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, MESSAGE_HEADER_PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, MESSAGE_INFO_PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, MESSAGE_TRANSPORT_PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, MESSAGE_CLASS_NAME, 128, null, null);
        field = new FieldInfo(this, MESSAGE_HEADER_CLASS_NAME, 128, null, null);
        field = new FieldInfo(this, MESSAGE_DATA_CLASS_NAME, 128, null, null);
        field = new FieldInfo(this, EXTERNAL_MESSAGE_CLASS_NAME, 128, null, null);
        field = new FieldInfo(this, MESSAGE_QUEUE_NAME, 60, null, null);
        field = new FieldInfo(this, MESSAGE_QUEUE_TYPE, 60, null, null);
        field = new FieldInfo(this, MESSAGE_DATA_TYPE, 30, null, null);
        field = new FieldInfo(this, XML_MESSAGE_DATA, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, MESSAGE_DATA, 32000, null, null);
        field = new FieldInfo(this, ERROR_TEXT, 127, null, null);
    }
813099
function CustomField(type, options) {
					mFields.Field.call(this, type, options);
					this.isImportant = true;
					this.element = mUtil.createElement(this.document, "div"); //$NON-NLS-0$
					this.element.className = "orion"; //$NON-NLS-0$
					this.menu = new mMenu.Menu({document: this.document, field: true, type: type});
					this.menu.onItemClick = this.onItemClick.bind(this);
					this.element.appendChild(this.menu.element);
					this.onFieldChange = mUtil.createEvent("CustomField.fieldChanged"); //$NON-NLS-0$
					this.onInputChange = this.onInputChange.bind(this);
				}
269716
private void setSystemField(String fieldName, String value) {
        if (Utils.isEmpty(value)) {
            m_valueMap.remove(fieldName);
        } else {
            m_valueMap.put(fieldName, Arrays.asList(value));
        }
    }
329006
def remove_field(self, field_name):
        """"""
        field = self._fields.pop(field_name, None)
        if field is not None and field.default is not None:
            if six.callable(field.default):
                self._default_callables.pop(field.key, None)
            else:
                self._defaults.pop(field.key, None)
1372832
function handleField (name, value, options) {
      var serialized
      var length
      var key
      var i

      options = options || { attachment: false }

      if (is(name).a(Object)) {
        for (key in name) {
          if (Object.prototype.hasOwnProperty.call(name, key)) {
            handleField(key, name[key], options)
          }
        }
      } else {
        if (is(value).a(Array)) {
          for (i = 0, length = value.length; i < length; i++) {
            serialized = handleFieldValue(value[i])
            if (serialized) {
              $this.rawField(name, serialized, options)
            }
          }
        } else if (value != null) {
          $this.rawField(name, handleFieldValue(value), options)
        }
      }

      return $this
    }
1082237
function (items, query, fields, exact) {
        var self = this;
        var isTarget = function (fieldName) {
          return fields.indexOf(fieldName) !== -1;
        };
        if (query === '') {
          return items;
        }
        fields = fields || ['name', 'owner', 'description', 'keyword'];
        return _.filter(items, function (item) {
          if ((isTarget('name') && self.matchedInString(query, item.name, exact)) ||
              (isTarget('owner') && self.matchedInString(query, item.owner, exact)) ||
              (isTarget('description') && self.matchedInString(query, item.description, exact)) ||
              (isTarget('keyword') && self.matchedInArray(query, item.keywords, exact))) {
            return true;
          }
          return false;
        });
      }
364537
private function setCustomFields()
    {
        $customFieldCollection = new CustomFieldCollection();

        if (isset($this->simpleXml->{'custom-fields'})) {
            /** @var SimpleXMLElement $field */
            foreach ($this->simpleXml->{'custom-fields'}->children() as $field) {
                $customField = $this->convertToCustomField($field);
                if (!is_null($customField)) {
                    $customFieldCollection->add($customField);
                }
            }
        }
        $this->customFields = $customFieldCollection;
    }
768614
function fieldsToMongo(fields) {
    if (!fields) return null
    var hash = {}
    fields.split(',').forEach(function(field) {
        hash[field.trim()] = 1
    })
    return hash
}
497084
public function handleField(Field $field)
    {
        $prefix = $this->prefix . strtoupper($field->name);

        if (!isset($field->label)) {
            $field->label = $prefix . '_LABEL';
        }

        if (preg_match('~^([A-Z_]+)$~', $field->label, $match)) {
            $prefix = $match[1];
        }

        if (preg_match('~^([A-Z_]+?)_LABEL$~', $field->label, $match)) {
            $prefix = $match[1];
        }

        if (!isset($field->description)) {
            $field->description = $prefix . '_DESC';
        }

        if (preg_match('~^([A-Z_]+?)_DESC$~', $field->description, $match)) {
            $prefix = $match[1];
        }

        if (!isset($field->hint)) {
            $field->hint = $prefix . '_HINT';
        }

        if (!isset($field->role)) {
            if (isset($this->special[$field->name])) {
                $field->role = $this->special[$field->name];
            }
        }

        if (isset($field->role)) {
            $this->fieldAliases[$field->role] = $field->name;
        }

        $this->reflector->addField($field);
    }
452126
def text_input(*args, **kwargs):
    '''
    
    '''
    text_input = wtforms.TextAreaField(*args, **kwargs)
    text_input.input_type = 'text'
    return text_input
877783
function createSplitterForField(multiFieldDefinitionPart, fieldName) {

	if (multiFieldDefinitionPart === undefined) {
		throw ("'multiFieldDefinitionPart' must not be undefined");
	}
	if (fieldName === undefined) {
		throw ("'fieldName' must not be undefined");
	}

	const delimiter = multiFieldDefinitionPart.delimiter;
	let escapeChar = multiFieldDefinitionPart.escapeChar;
	let removeWhiteSpace = true;
	let uniqueFields = true;
	let sortFields = true;
	let removeEmpty = true;

	// set default values
	if (multiFieldDefinitionPart.removeWhiteSpace !== undefined) {
		// remove leading and trailing whitespaces
		removeWhiteSpace = multiFieldDefinitionPart.removeWhiteSpace;
	}

	if (multiFieldDefinitionPart.uniqueFields !== undefined) {
		// remove duplicates from the list
		uniqueFields = multiFieldDefinitionPart.uniqueFields;
	}

	if (multiFieldDefinitionPart.sortFields !== undefined) {
		// sort the fields
		sortFields = multiFieldDefinitionPart.sortFields;
	}
	if (multiFieldDefinitionPart.removeEmpty !== undefined) {
		// Empty fields will be deleted
		removeEmpty = multiFieldDefinitionPart.removeEmpty;
	}


	return function (content) {
		if (content.hasOwnProperty(fieldName)) {
			// the field exists in the content record
			let fieldValue = content[fieldName];
			if (fieldValue) {

				// ------------------------------------------------
				// escape delimiter
				// ------------------------------------------------
				if (escapeChar) {
					escapeChar = escapeChar.replace(/\\/, "\\\\");
					escapeChar = escapeChar.replace(/\//, "\\/");

					// The escaped delimiter will be replaced by the string '<--DIVIDER-->'
					let re = new RegExp(escapeChar + delimiter, 'g');
					fieldValue = fieldValue.replace(re, TMP_DEVIDER);
				}

				// ------------------------------------------------
				// split the string
				// ------------------------------------------------
				let values = fieldValue.split(delimiter);

				if (escapeChar) {
					// remove the escape char
					let re = new RegExp(TMP_DEVIDER, 'g');
					for (let i = 0; i < values.length; i++) {
						values[i] = values[i].replace(re, delimiter);
					}
				}


				// ------------------------------------------------
				// remove the leading and trailing whiteSpaces
				// ------------------------------------------------
				if (removeWhiteSpace) {
					for (let i = 0; i < values.length; i++) {
						values[i] = values[i].trim();
					}
				}

				// ------------------------------------------------
				// remove empty fields
				// ------------------------------------------------
				if (removeEmpty) {
					let i = 0;
					let j = 0;
					for (i = 0; i < values.length; i++) {
						if (values[i]) {
							values[j] = values[i];
							j++;
						}
					}
					values.splice(j, i);
				}

				// ------------------------------------------------
				// sort fields
				// ------------------------------------------------
				if (sortFields) {
					values.sort();
				}

				// ------------------------------------------------
				// remove duplicates
				// ------------------------------------------------
				if (uniqueFields) {
					values = values.filter(function (elem, pos) {
						return values.indexOf(elem) == pos;
					});
				}

				// ------------------------------------------------
				// store the splited fields back to the content
				// ------------------------------------------------
				content[fieldName] = values;
			}
		}

		return null;
	};
}
1130372
def field(ctx, text, index, delimiter=' '):
    
    splits = text.split(delimiter)

    # remove our delimiters and whitespace
    splits = [f for f in splits if f != delimiter and len(f.strip()) > 0]

    index = conversions.to_integer(index, ctx)
    if index < 1:
        raise ValueError('Field index cannot be less than 1')

    if index <= len(splits):
        return splits[index-1]
    else:
        return ''
1099910
def p_field_all(self, p):
        
        p[0] = Field(name=p[2], alias=p[1], arguments=p[3], directives=p[4],
                     selections=p[5])