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;
    }
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;
    }
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 ; }
Handles the data attributes containing the values of the form fields.

Example: `fz-value-color="blue"`

@param FormResult $formResult
@return array
Handles the data attributes containing the values of the form fields .