protected function buildViewportField($viewport)
    {
        if ($this->useTextInput) {
            
            $field = TextField::create(
                $this->getViewportName($viewport),
                $this->getViewportLabel($viewport)
            );
            
        } else {
            
            $field = DropdownField::create(
                $this->getViewportName($viewport),
                $this->getViewportLabel($viewport),
                $this->getSource()
            );
            
        }
        
        return $field;
    }