diff --git a/packages/form-js-viewer/src/render/components/form-fields/Button.js b/packages/form-js-viewer/src/render/components/form-fields/Button.js index 966c88f3c..ed57d6e74 100644 --- a/packages/form-js-viewer/src/render/components/form-fields/Button.js +++ b/packages/form-js-viewer/src/render/components/form-fields/Button.js @@ -1,17 +1,25 @@ import { formFieldClasses } from '../Util'; -import { useSingleLineTemplateEvaluation } from '../../hooks'; +import { useSingleLineTemplateEvaluation, useService } from '../../hooks'; const type = 'button'; export function Button(props) { const { disabled, onFocus, onBlur, field } = props; - const { action = 'submit' } = field; - const evaluatedLabel = useSingleLineTemplateEvaluation(field.label || '', { debug: true }); + const form = useService('form'); + const { schema } = form._getState(); + + const direction = schema?.direction || 'ltr'; // Fetch the direction value from the form schema + return ( -