Adding dynamic values in the dropdown field while adding steps in forms for Actions

We are trying to use ‘forms for Actions’ to render forms to collect additional information from the user post login.
Is there a way to add dynamic values fetched from an API to the dropdown options?
Example: We want to add a field called “pincode” - this field should contain all the allowed pincodes based on the country the user is in. If the user is from India, the user should see all the Indian pincodes when he tries to select the pincode from the dropdown.

4 Likes

So far, I have been able to create a form that is working as expected EXCEPT for the same use case as above. We create a ‘flow’ that makes an HTTP request, then in the next step it stores the data received from the API response as a ‘stored shared variable’. We have also been able to set elements such as text inputs to display items returned from our API call and saved in the stored variable. It appears that with a dropdown select component that you can set an option to be “preselected” in the action IF the form element contains that option/value. I think this is a bug in the implementation. Would be very helpful to set the dropdown select options to a list/array of strings returned from an API call. In our case it would be ID of the business that a user may be associated with - since they could be associated with 100s we do not want to store this in user.user_metadata or user.app_metadata. Please let us know if this is something that has been noticed and is being fixed? Perhaps there is just documentation missing?

1 Like

Hi @apurvasharmad and @dcoulombe

Welcome to the Auth0 Community!

Thank you for posting your question. Unfortunately, dynamic dropdown list adjustment is unavailable in the Early Access Forms for Actions feature. However, the team is still developing and improving this feature, and I encourage you to leave the team feedback in the Feedback category. You can read our FAQ regarding submitting a feature request here: How do I submit Product feedback or feature requests?

Thanks
Dawid

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.