public function getFieldsValuesDataAttributes(FormResult $formResult)
    {
        $result = [];
        $formObject = $this->getFormObject();
        $formInstance = $formObject->getForm();

        foreach ($formObject->getConfiguration()->getFields() as $field) {
            $fieldName = $field->getName();

            if (false === $formResult->fieldIsDeactivated($field)) {
                $value = ObjectAccess::getProperty($formInstance, $fieldName);
                $value = (is_array($value))
                    ? implode(' ', $value)
                    : $value;

                if (false === empty($value)) {
                    $result[self::getFieldDataValueKey($fieldName)] = $value;
                }
            }
        }

        return $result;
    }