protected function getFormValuesFor(Form $form)
    {
        $values = [];
        $fields = $form->all();
        foreach ($fields as $field) {
            if ($field->isDisabled() || !$field->hasValue() || $field instanceof FileFormField) {
                continue;
            }
            $fieldName = $this->getSubmissionFormFieldName($field->getName());
            if (substr($field->getName(), -2) === '[]') {
                if (!isset($values[$fieldName])) {
                    $values[$fieldName] = [];
                }
                $values[$fieldName][] = $field->getValue();
            } else {
                $values[$fieldName] = $field->getValue();
            }
        }
        return $values;
    }
protected function getFormValuesFor(Form $form)
    {
        $values = [];
        $fields = $form->all();
        foreach ($fields as $field) {
            if ($field->isDisabled() || !$field->hasValue() || $field instanceof FileFormField) {
                continue;
            }
            $fieldName = $this->getSubmissionFormFieldName($field->getName());
            if (substr($field->getName(), -2) === '[]') {
                if (!isset($values[$fieldName])) {
                    $values[$fieldName] = [];
                }
                $values[$fieldName][] = $field->getValue();
            } else {
                $values[$fieldName] = $field->getValue();
            }
        }
        return $values;
    }
protected function getFormValuesFor ( Form $ form ) { $ values = [ ] ; $ fields = $ form -> all ( ) ; foreach ( $ fields as $ field ) { if ( $ field -> isDisabled ( ) || ! $ field -> hasValue ( ) || $ field instanceof FileFormField ) { continue ; } $ fieldName = $ this -> getSubmissionFormFieldName ( $ field -> getName ( ) ) ; if ( substr ( $ field -> getName ( ) , - 2 ) === '[]' ) { if ( ! isset ( $ values [ $ fieldName ] ) ) { $ values [ $ fieldName ] = [ ] ; } $ values [ $ fieldName ] [ ] = $ field -> getValue ( ) ; } else { $ values [ $ fieldName ] = $ field -> getValue ( ) ; } } return $ values ; }
Returns an array of name => value pairs for the passed form.

For form fields containing a name ending in [], an array is
created out of all field values with the given name.

@param \Symfony\Component\DomCrawler\Form the form
@return array an array of name => value pairs
Returns an array of name = > value pairs for the passed form .