formie icon indicating copy to clipboard operation
formie copied to clipboard

Change button/submit text via setFieldSettings

Open jamiematrix opened this issue 2 years ago • 1 comments

What are you trying to do?

I want to dynamically set the text on a button on a page using the setFieldSettings method but it appears button or submit aren't in the docs to make changes to.

What's your proposed solution?

Add basic support to change parts of the submit button - even if it's just the text on the button.

Additional context

No response

jamiematrix avatar Oct 05 '22 10:10 jamiematrix

You can't use setFieldSettings because buttons aren't fields, and they are also in the context of a page. Unlike fields, you can have multiple buttons in a form.

The recommended approach is to use Theme Config for this, but it doesn't really handle multiple pages well, and you can't set the text of an element (yet).

I'll give this some further thought.

engram-design avatar Oct 06 '22 20:10 engram-design