Dynamically Select Multiple Values In A Select Box In An Update Form

How To Dynamically Select Multiple Values In A Select Box In An Update Form

are you trying to get filtered options from each select, for example:

Select 1:
A
B
C

Select 2: (Filtered by select 1)
B1
B2
B3

1 Like

Wow I am now replying. Yes . is there anyway. to do this?

Yeah, its easy.
This is the way I do it for ecommerce sites;

  1. Have in your data base
    a. Department {id} {Deptment_name}
    b. Category {id} {dept_id} {cat_name}

  2. Set these up as server actions (on the category tick no load and filtered by ($_get) which will be the department value.

  3. Populate your first select by Department

  4. Populate your second select by Category

  5. On your first select add a ‘on value change’ load Category - This is where you use the $_get with the department_id

So basically when you change select 1 it will filter the data for that value and load in select 2.

Hope that helps :slight_smile: