Populate Dropdown with Selection From Another Dropdown

I'm having zero luck creating this function, or finding another instance of it being created. Any help would be greatly appreciated!

I'm trying to dynamically change the selection options in dropdown B based on the selections of dropdown A. For example. Let's say dropdown A has five options for the semesters a student could be registered. If I selected semester 1, semester 2, and semester 3, I would only want those selected semesters to appear in dropdown B.

I can't find any combination of functions and formulas to pull this off, but it would be extremely helpful to the end user if the forms had limited and dynamic options. We are managing with the full semester list in each dropdown, but making the change would open up some additional options for us.

Thank you for your help and input!

Hi @COREY_CHARLE,

You can use values attribute in dropdown menu to put options dynamically as follows:

Select Semester(s): {formmenu: Semester 1; Semester 2; Semester 3; Semester 4; Semester 5; multiple=yes; name=selected_semesters}

{formmenu: name=semester_options; values={=selected_semesters}}

This is great! I could have sworn I tried this first thing, but maybe not. Is there a way to format the values? Dropdown A is pulling its value options from a read table for a datablaze. When I selected the dropdown A values I need, the dropdown B values contained brackets and quotations.

Nevermind. This was a user error. I was able to sort this out.

It did lead to a second question, however. Now that we can put values from one dropdown, can I check it against another? So, dropdown C would show me values from dropdown A, and weren't used in dropdown B? This might be asking to much now...

Hi @COREY_CHARLE,

You can do that using our filter function as follows:

Select Semester(s) for Dropdown A: {formmenu: Semester 1; Semester 2; Semester 3; Semester 4; Semester 5; multiple=yes; name=dropdown_a}

Select Semester(s) for Dropdown B: {formmenu: name=dropdown_b; multiple=yes; values={=dropdown_a}}

Select Semester(s) for Dropdown C: {formmenu: values={=filter(dropdown_a, v -> not includes(dropdown_b, v))}; multiple=yes; name=dropdown_c}