Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Injecting formfield options dynamically #1345

Open
mamrezn7 opened this issue Jan 13, 2025 · 1 comment
Open

Injecting formfield options dynamically #1345

mamrezn7 opened this issue Jan 13, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@mamrezn7
Copy link

Having messed around with Form.js for a couple weeks, i still cant get my head around how i can programmatically inject options into multi option form fields, for example i need to fetch the data on the react project i have already set up, and inject it without calling the importSchema() method. i cant call this method since it causes rerenders on the whole form and i lose all the data i have typed in the form while i was waiting for my fetch to return the data. updating schema and adding the desired elements to the DOM has been done, but the validation ignores the updated schema because it was updated after importSchema was called.
there must be something im missing here, please help me out.

@mamrezn7 mamrezn7 added the bug Something isn't working label Jan 13, 2025
@Skaiir
Copy link
Contributor

Skaiir commented Feb 6, 2025

Hey there, apologies for the late response, the project is a bit in limbo right now but we're working on resolving that. So you don't want to call the importSchema() method. We don't have a purely dynamic system in the sense of bringing externally sourced data into the form at runtime yet.

However, what you can do is supply ALL of the data you want in the form ahead of time, and then using a FEEL expression, define which become available based on some other field. You can look into how this is set up here: https://docs.camunda.io/docs/components/modeler/forms/configuration/forms-config-options/

Feel free to ping me if this doesn't cover your use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants