src/Form/HandleFormFields.php
function findFieldByKey(string $key)
    {
        $this->checkFormIsBuilt();

        $fields = collect($this->fields);

        if(strpos($key, ".") !== false) {
            list($key, $itemKey) = explode(".", $key);
            $listField = $fields->where("key", $key)->first();

            return $listField->findItemFormFieldByKey($itemKey);
        }

        return $fields->where("key", $key)->first();
    }
function findFieldByKey(string $key)
    {
        $this->checkFormIsBuilt();

        $fields = collect($this->fields);

        if(strpos($key, ".") !== false) {
            list($key, $itemKey) = explode(".", $key);
            $listField = $fields->where("key", $key)->first();

            return $listField->findItemFormFieldByKey($itemKey);
        }

        return $fields->where("key", $key)->first();
    }
function findFieldByKey ( string $ key ) { $ this -> checkFormIsBuilt ( ) ; $ fields = collect ( $ this -> fields ) ; if ( strpos ( $ key , "." ) !== false ) { list ( $ key , $ itemKey ) = explode ( "." , $ key ) ; $ listField = $ fields -> where ( "key" , $ key ) -> first ( ) ; return $ listField -> findItemFormFieldByKey ( $ itemKey ) ; } return $ fields -> where ( "key" , $ key ) -> first ( ) ; }
Find a field by its key.

@param string $key
@return SharpFormField
Find a field by its key .