Dan Gagliardi
Posts: 0
Joined: Tue Apr 23, 2013 8:02 pm

Reset cascading SELECT menu dropdown boxes

I have 3 SELECT menus, all populated from 3 different Collections.

S1 - S2 - S3

First time through the interface, S1 is populated, S2, S3 are not. choose S2, S3 gets populated.

Go back and Choose a new option form S1, S2 refreshes with new set, but S3 still has list of options from the first selection of S2. How can I reset both S3 when I choose a new option in S1.

Thanks
D

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Reset cascading SELECT menu dropdown boxes

It's can be done with JavaScript. Here is a starting point: http://docs.appery.io/tutorials/build...

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Reset cascading SELECT menu dropdown boxes

Hi Dan,

Just to add. To clean Select Menu component use "Run Javascript" action with the following code: codeAppery('selectMenuComponent').empty().selectmenu('refresh');/code Replace 'selectMenuComponent' with the component name.

Dan Gagliardi
Posts: 0
Joined: Tue Apr 23, 2013 8:02 pm

Reset cascading SELECT menu dropdown boxes

for some reason, using the empty() method removes all entries and then the REST service can't properly populate the select box. I think I would need to empty() then add a no value option, then refresh.

Thanks for the help!

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Reset cascading SELECT menu dropdown boxes

Let us know about the result.

Return to “Issues”