Skip to content

Commit 02cab80

Browse files
committed
feat: add conditional logic to reduce survey questions
- Move employment status back to Work section (work-q-0) - Show Work section only for users with professional experience (profile-q-5 ≠ 0) - Add location-based conditionals to 4 salary questions (profile-q-7) - Reduce Profile from 10 to 9 questions Impact: - Users without professional experience skip Work section entirely - Users in Morocco see 2 salary questions (MAD currency) - Users abroad see 2 salary questions (USD currency) - Students coding professionally still see Work section Question IDs: - Profile: profile-q-9 removed, now 9 questions - Work: Employment status added as work-q-0, all questions shifted +1 - Salary conditionals on work-q-4 to work-q-7
1 parent 2a947e1 commit 02cab80

File tree

2 files changed

+67
-52
lines changed

2 files changed

+67
-52
lines changed

survey/1-profile.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ questions:
2121
- label: Where are you currently located?
2222
required: true
2323
choices:
24-
- "Rabat-Salé-Kénitra"
25-
- "Casablanca-Settat"
26-
- "Marrakech-Safi"
27-
- "Tanger-Tétouan-Al Hoceïma"
24+
- Rabat-Salé-Kénitra
25+
- Casablanca-Settat
26+
- Marrakech-Safi
27+
- Tanger-Tétouan-Al Hoceïma
2828
- "L'Oriental"
29-
- "Fès-Meknès"
30-
- "Béni Mellal-Khénifra"
31-
- "Drâa-Tafilalet"
32-
- "Souss-Massa"
33-
- "Guelmim-Oued Noun"
34-
- "Laâyoune-Sakia El Hamra"
35-
- "Dakhla-Oued Ed Dahab"
29+
- Fès-Meknès
30+
- Béni Mellal-Khénifra
31+
- Drâa-Tafilalet
32+
- Souss-Massa
33+
- Guelmim-Oued Noun
34+
- Laâyoune-Sakia El Hamra
35+
- Dakhla-Oued Ed Dahab
3636
- Europe
3737
- "US & Canada"
38-
- "Middle East"
38+
- Middle East
3939
- Others
4040

4141
- label: What is your occupation?

survey/3-work.yml

Lines changed: 55 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
title: Work
22
label: work
33
position: 3
4+
showIf:
5+
question: profile-q-5
6+
notEquals: 0
47
questions:
5-
- label: "What is your employment status?"
8+
- label: What is your employment status?
69
required: true
710
multiple: false
811
choices:
@@ -24,7 +27,7 @@ questions:
2427
- "Sometimes: 1-2 days per month but less than weekly"
2528
- "Often: 1-2 days per week or more"
2629
- "Very often: 3-5 days per week"
27-
- "Daily"
30+
- Daily
2831

2932
- label: How do you feel about your job?
3033
required: false
@@ -44,56 +47,68 @@ questions:
4447
- More than 1 year
4548

4649
- label: "If you are a full time employee in Morocco(CDI), Your NET salary range per month in MAD is:"
50+
showIf:
51+
question: profile-q-7
52+
notEquals: 3
4753
choices:
48-
- "< 4 000"
49-
- "4 000 - 6 000"
50-
- "6 000 - 8 000"
51-
- "8 000 - 10 000"
52-
- "10 000 - 12 000"
53-
- "12 000 - 14 000"
54-
- "14 000 - 16 000"
55-
- "16 000 - 18 000"
56-
- "18 000 - 20 000"
57-
- "20 000 - 22 000"
58-
- "22 000 - 25 000"
59-
- "25 000 - 30 000"
54+
- < 4 000
55+
- 4 000 - 6 000
56+
- 6 000 - 8 000
57+
- 8 000 - 10 000
58+
- 10 000 - 12 000
59+
- 12 000 - 14 000
60+
- 14 000 - 16 000
61+
- 16 000 - 18 000
62+
- 18 000 - 20 000
63+
- 20 000 - 22 000
64+
- 22 000 - 25 000
65+
- 25 000 - 30 000
6066
- "> 30 000"
6167

6268
- label: "If you are working as a freelancer in Morocco, Your salary range per day in MAD(TJM) is:"
69+
showIf:
70+
question: profile-q-7
71+
notEquals: 3
6372
choices:
64-
- "< 1 000"
65-
- "1 000 - 1 500"
66-
- "1 500 - 2 000"
67-
- "2 000 - 2 500"
68-
- "2 500 - 3 000"
69-
- "3 000 - 4 000"
70-
- "4 000 - 5 000"
73+
- < 1 000
74+
- 1 000 - 1 500
75+
- 1 500 - 2 000
76+
- 2 000 - 2 500
77+
- 2 500 - 3 000
78+
- 3 000 - 4 000
79+
- 4 000 - 5 000
7180
- "> 5 000"
7281

7382
- label: "If you are working full-time contract outside Morocco, Your gross salary range per year in USD is:"
83+
showIf:
84+
question: profile-q-7
85+
equals: 3
7486
choices:
75-
- "< 20 000"
76-
- "20 000 - 25 000"
77-
- "25 000 - 30 000"
78-
- "30 000 - 40 000"
79-
- "40 000 - 50 000"
80-
- "50 000 - 60 000"
81-
- "60 000 - 80 000"
82-
- "80 000 - 100 000"
83-
- "100 000 - 120 000"
84-
- "120 000 - 150 000"
85-
- "150 000 - 200 000"
87+
- < 20 000
88+
- 20 000 - 25 000
89+
- 25 000 - 30 000
90+
- 30 000 - 40 000
91+
- 40 000 - 50 000
92+
- 50 000 - 60 000
93+
- 60 000 - 80 000
94+
- 80 000 - 100 000
95+
- 100 000 - 120 000
96+
- 120 000 - 150 000
97+
- 150 000 - 200 000
8698
- "> 200 000"
8799

88100
- label: "If you are working as a freelancer/contractor outside Morocco, Your daily gross wage in USD is:"
101+
showIf:
102+
question: profile-q-7
103+
equals: 3
89104
choices:
90-
- "< 200"
91-
- "200 - 500"
92-
- "500 - 1 000"
93-
- "1 000 - 2 000"
94-
- "2 000 - 3 000"
95-
- "3 000 - 5 000"
96-
- "5 000 - 10 000"
105+
- < 200
106+
- 200 - 500
107+
- 500 - 1 000
108+
- 1 000 - 2 000
109+
- 2 000 - 3 000
110+
- 3 000 - 5 000
111+
- 5 000 - 10 000
97112
- "> 10 000"
98113

99114
- label: What characteristics would mostly influence your decision to choose one job offer over another?
@@ -148,7 +163,7 @@ questions:
148163
- Full remote
149164
- Part-time remote/Hybrid
150165

151-
- label: "Which sectors are you currently working in?"
166+
- label: Which sectors are you currently working in?
152167
multiple: true
153168
required: false
154169
choices:

0 commit comments

Comments
 (0)