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();
    }
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();
    }
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 ( ) ; }
Get the values of a set of input fields.

@param Crawler $input
@return array|string
Get the values of a set of input fields .