Returns a named field in a sequential set.
Use this if you're using nested FormFields.

@param string $name The name of the field to return
@return FormField instance
512451
public function dataFieldByName($name)
    {
        if ($dataFields = $this->dataFields()) {
            foreach ($dataFields as $child) {
                if (trim($name) == trim($child->getName()) || $name == $child->id) {
                    return $child;
                }
            }
        }
        return null;
    }
1293622
public FieldDescriptorDef getField(String name)
    {
        FieldDescriptorDef fieldDef = null;

        for (Iterator it = _fields.iterator(); it.hasNext(); )
        {
            fieldDef = (FieldDescriptorDef)it.next();
            if (fieldDef.getName().equals(name))
            {
                return fieldDef;
            }
        }
        return null;
    }
846007
public function field($name)
    {
        foreach($this->data as $post)
        {
            $fieldType = get_field_object($name, $post->ID)['type'];

            if(in_array($fieldType, ['text']))
            {
                $post->$name = get_field($name, $post->ID);
            }
            elseif(in_array($fieldType, ['image']))
            {
                $post->$name = Data::arrayToObject(get_field($name, $post->ID));
            }
        }

        return $this->data;
    }
1051490
protected function getField($name)
    {
        if (array_key_exists($name, $this->fields)) {
            return $this->fields[$name];
        } else {
            throw new FormatterException('Field not exists');
        }
    }
731039
public static function getField(string $name = null): string
    {
        $name = $name ?: self::$currentName;

        return sprintf('<input type="text" name="%s">', $name);
    }
107034
public function field($name)
    {
        return $this->fields()->first(function (Field $field) use ($name) {
            return $field->column() == $name;
        });
    }
68561
public function first($name)
    {
        if ($this->hasValue($name)) {
            return $this->getValue($name);
        }

        foreach ($this->getStructures() as $childStructure) {
            if ($result = $childStructure->first($name)) {
                return $result;
            }
        }

        return null;
    }
908830
public function getField($name)
    {
        return (null !== $name && array_key_exists($name, $this->fields)) ? $this->fields[$name] : null;
    }
174155
public function getRelatedField($name)
    {
        $field = $this->getField($name);

        return $field instanceof RelatedField ? $field : null;
    }
481212
public function getField($name)
    {
        if ($this->has($name)) {
            return $this->fields[$name];
        }

        throw new \InvalidArgumentException(
            'Field with name ['. $name .'] does not exist in class '.get_class($this)
        );
    }
1280831
protected function getForm($name = null, $option = null){
		if (!$name) {
			$name = $this->getName();
		}
		$frmCls = $this->getFormClass($option);
		$form = $this->getServiceLocator()->get('FormElementManager')->get($frmCls);
		return $form;
	}
596317
private function getFieldsWithName($name)
    {
        $trigFields = array();
        $fields = &$this->form->currentFields;
        if (isset($fields[$name])) {
            $trigFields[] = $fields[$name];
        } else {
            foreach ($fields as $f) {
                if ($f->attribs['name'] == $name) {
                    $trigFields[] = $f;
                }
            }
        }
        return $trigFields;
    }
158731
public function field($name)
    {
        return isset($this->_properties['fields'][$name])?
            $this->_properties['fields'][$name]:null;
    }
858673
public function field($name)
  {
    return isset($this->fields[$name]) ? $this->fields[$name] : false;
  }
193315
public function removeFieldByName($name)
    {
        foreach ($this->fields as $i => $field) {
            if ($field->getName() == $name) {
                unset($this->fields[$i]);
                break;
            }
        }

        return $this;
    }
1076069
public function getForeignField($name)
    {
        $field = $this->getField($name);

        return $field instanceof ForeignField ? $field : null;
    }
434710
public function getDynamicField($name)
    {                              
        $fields = $this->getFieldsDef();
        
        if (!isset($fields[$name])) {
            if (isset($this->fields[$name]))
                return $this->fields[$name];
            return false;
        }  
            //throw new LogicException('Property "'.$name.'" does not exist.'); 
    
        switch($fields[$name]['type']){
        	//case FIELD_FORM: 
            //    return $this->getFormField($fields[$name]);
        	//	break;
        	case FIELD_LINK: 
        	case FIELD_MATERIAL: 
                return $this->getMaterialField($fields[$name]);
        		    break;
        	//case FIELD_HLINK: 
          //      return $this->getHlinkField($fields[$name]);
        	//	    break;
        	case FIELD_LINKSET: 
        	case FIELD_MATSET: 
                return $this->getLinksetField($fields[$name]);
        		    break;
        	case FIELD_LINKSET2: 
                return $this->getLinkset2Field($fields[$name]);
        		    break;					
        	default: 
                return $this->getPlainField($fields[$name]); 
        }
    }