Can I filter select options?
-
Hello, I am trying to streamline a trip booking page. Right now I have all available trips in a select field “tripname” (https://sawback.com/booknow). This list is unwieldy. I would like to filter the available “tripname” options based on season and trip type.
E.g.
Ski Trip A (2021)
Ski Trip B (2021)
Ski Trip C (2022)Hike Trip A (2021)
Hike Trip B (2022)
Hike Trip C (2022)Q1: Choose year (e.g. 2021)
Q2: Choose type (e.g. Ski)
Q3: options available would then be “Ski Trip A” and “Ski Trip B”I have tried to do this with Conditional Fields free plug-in but it’s not working. I suspect this is because I have multiple groups with the same field name “tripname”. When I select for example “Ski Trip A” the tripname that gets passed is incorrect, and in fact the first in the list of the last group in my form.
I have looked at the Pro version but I’m not sure it will do what I need it to.
Below are the details that describe my situation.
Thanks in advance
TomHere’s a link to my test form: https://sawback.com/select-trip/
Here’s the form code that it uses:
For which season do you wish to book?
[select season “2021 Winter” “2022 Winter”]What type of trip are you interested in? [select triptype “——” “Short and Local Courses and Guided Trips” “Lodge and Hut Trips” “International trips: Sail, Japan, etc.” “Wild Trips: Ski Camps, Traverses, etc.”]
[group Courses2021]
Which Short and Local Trip do you want to book?
[select tripname “——” “Avalanche Skills Course (all dates)” “Guided
Backcountry Day (all dates)” ]
[/group][group Lodge2021]
Which lodge trip do you want to book?
[select tripname “——” “2021 Burnie Glacier – Jan 8-15 (BG21-1)” “2021 Valhalla Lodge – Jan 23-30 (VL21)” “2021 Wapta Traverse – Feb 14-18 (WT21-1)” “2021 Selkirk Lodge – Feb 13-20 (SL21)” “2021 Battle Abbey March 6-13 (BA21)” “2021 Burnie Glacier – March 19-26 (BG21-2)” “2021 Wapta Traverse – March (WT21)” “2021 Bow Yoho Traverse March April (BY21)”]
[/group][group International2021]
Which international trip do you want to book?
[select tripname “——” “2021 Svalbard Ski and Sail April 30-May 9, 2021 (NO21-1)” “2021 Svalbard Ski and Sail May 6-16, 2021 (NO21-2)”]
[/group][group Wild2021]
Which Wild Ski trip (ski camp, traverse, etc.) do you want to book?
[select tripname “——” “2021 Spearhead Traverse Jan 15-18 (ST21-1)” “2021 Spearhead Traverse Feb 12-14 (ST21-2)” “2021 Nirvana Pass March 7-13 (NP21)” “2021 Northern Selkirks April 3-1 (NS21)” “2021 Bugs to Rogers Traverse April 11-25 (BR21)” ]
[/group][submit “Submit”]
Here’s the Conditional Fields code:
show [Courses2021] if [season] equals “2021 Winter”
and if [triptype] equals “Short and Local Courses and Guided Trips”show [Lodge2021] if [season] equals “2021 Winter”
and if [triptype] equals “Lodge and Hut Trips”show [International2021] if [season] equals “2021 Winter”
and if [triptype] equals “International trips: Sail, Japan, etc.”show [Wild2021] if [season] equals “2021 Winter”
and if [triptype] equals “Wild Trips: Ski Camps, Traverses, etc.”The page I need help with: [log in to see the link]
The topic ‘Can I filter select options?’ is closed to new replies.