Category: Configuration
Resource links
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Autofill Dropdown From Another Dropdown

Issue

I'm having trouble figuring out how to auto-update a second dropdown based on the option chosen in the first dropdown, which is populated from a MySQL database. Additionally, I'm trying to autofill some dynamic table columns and add them up based on the selected item in the dropdown. It seems like I need to convert the dropdown values into an array of objects that is accepted in a table format, but it's proving to be a challenging task.

Resolution

The solution involves retrieving data from a MySQL database and populating it into a dropdown using JavaScript. Once an option is chosen, it will trigger another dropdown to auto-update its contents based on the selected value.

We have a sample app that demonstrates how to achieve this. You can fork it to check the code.