protected function getInputValue($input)
    {
        if ($input->attr('type') == 'checkbox' or $input->attr('type') == 'radio') {
            $values = [];

            foreach ($input->filter(':checked') as $checkbox) {
                $values[] = $checkbox->getAttribute('value');
            }

            return $values;
        }

        return (new InputFormField($input->getNode(0)))->getValue();
    }