Item list based on sign up input (list filters)

alt=
@tunefeed
6 years ago
22 posts
I have user locations in my sign up form.
Has anyone made a page with location filters?
So you can select location from a the chain select and the item list will generate a list of audio files where the user location = Seattle, WA?
updated by @tunefeed: 05/19/18 06:55:25PM
paul
@paul
6 years ago
4,326 posts
Try this code to show logged in users music from their location -
{jrCore_list module="jrAudio" search1="user_location_0 = `$_user.user_location_0`" search2="user_location_1 = `$_user.user_location_1`" . . . }
I'm guessing that user_location_0/1 are your user state/city fields. Adjust if necessary.


--
Paul Asher - JR Developer and System Import Specialist
alt=
@tunefeed
6 years ago
22 posts
I'm looking to have a chain select option above the item list so users can change the list to show items from specific locations. So you can select US>oregon>portland and see an audio item list solely from oregon then select US>Washington>Seattle to see items from seattle.
This will require a chained select embedded with data variables that are integrated into the item list.
I'd like the chain select module to not take up 3 whole rows as well as that seems to be a big waste of space when they could go next to each other. This code looks like it would generate only 1 list that would not be changeable by the user.
paul
@paul
6 years ago
4,326 posts
Its doable but you'll need to build the form and fields 'by hand' in the template using html (but that would give you the opportunity to layout the fields side by side).
Take a look at the html source code of a page (user signup?) with the location form on it to see the code for the actual fields, then adapt that code into the page template. The form will now need a submit button. Its action will be to refresh the page but with post variables of the field selections in the URL. These post variables can then be used in the jrCore_list search parameters -

{jrCore_list module="jrAudio" search1="user_location_0 = `$_post.state`" search2="user_location_1 = `$_post.city`" . . . }

This gives an idea how it might work and points you in the right direction. I can't give you any sample code as it would take me a few hours to work it all out and test it etc. Maybe someone else here has done this and can help, otherwise, you might need to sponsor us to do this custom development for you.


--
Paul Asher - JR Developer and System Import Specialist

Tags