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

How to load Select values from within Next.js/React #1744

Open
kachmul2004 opened this issue May 12, 2024 · 0 comments
Open

How to load Select values from within Next.js/React #1744

kachmul2004 opened this issue May 12, 2024 · 0 comments

Comments

@kachmul2004
Copy link

kachmul2004 commented May 12, 2024

I have created a form using the form builder and added a select field. The list of options for the Select field must come from an API endpoint that requires authentication and authorisation, and also filters the available options based on the user who makes the request.

I am able to generate this list of options within my Next.js application, so there's no need for me to do it again via the form builder. Therefore, I would like to know how I can pass this JSON, that I already have in my application, into the form's select field. How would I do that?

NOTE: I'm using formio-react to display the form (using the src prop of the form component).

Also, I looked at the documentation on Select data source options, but I don't think any of the examples there cover this scenario

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant