export function productivitySystemFinderQuiz(form: FormTs) {
form.setTitle(() => '⏰ Which Productivity System Fits You Best?');
// ============ ARCHETYPE SCORING SYSTEM ============
const scores = form.state<Record<string, number>>({
gtd: 0, // Getting Things Done
pomodoro: 0, // Pomodoro Technique
timeBlocking: 0, // Time Blocking / Calendar Blocking
eisenhower: 0, // Eisenhower Matrix
kanban: 0 // Kanban / Visual Boards
});
const updateScore = (system: string, points: number) => {
scores.update(current => ({
...current,
[system]: (current[system] || 0) + points
}));
};
const getWinningSystem = (): string => {
const s = scores();
let maxSystem = 'gtd';
let maxScore = 0;
for (const [system, score] of Object.entries(s)) {
if (score > maxScore) {
maxScore = score;
maxSystem = system;
}
}
return maxSystem;
};
const getSystemName = (system: string) => {
const names: Record<string, string> = {
gtd: 'Getting Things Done (GTD)',
pomodoro: 'Pomodoro Technique',
timeBlocking: 'Time Blocking',
eisenhower: 'Eisenhower Matrix',
kanban: 'Kanban Boards'
};
return names[system] || system;
};
const getSystemEmoji = (system: string) => {
const emojis: Record<string, string> = {
gtd: '📥',
pomodoro: '🍅',
timeBlocking: '📅',
eisenhower: '🎯',
kanban: '📋'
};
return emojis[system] || '✨';
};
const getSystemDescription = (system: string) => {
const descriptions: Record<string, string> = {
gtd: 'You thrive with a comprehensive system for capturing, organizing, and processing everything. GTD helps you get thoughts out of your head and into a trusted system.',
pomodoro: 'You work best in focused sprints with regular breaks. The Pomodoro Technique helps you maintain deep focus while preventing burnout.',
timeBlocking: 'You need structure and visual control over your day. Time Blocking helps you protect your most important work by scheduling it in advance.',
eisenhower: 'You need help prioritizing when everything feels urgent. The Eisenhower Matrix helps you distinguish between urgent and important tasks.',
kanban: 'You\'re a visual thinker who needs to see work flowing. Kanban boards help you visualize progress and limit work in progress.'
};
return descriptions[system] || '';
};
const getTopTools = (system: string): string[] => {
const tools: Record<string, string[]> = {
gtd: ['Todoist', 'OmniFocus', 'Things 3', 'Notion'],
pomodoro: ['Pomofocus', 'Forest App', 'Focus Keeper', 'Be Focused'],
timeBlocking: ['Google Calendar', 'Clockwise', 'SkedPal', 'Fantastical'],
eisenhower: ['Eisenhower.me', 'Priority Matrix', 'Todoist with labels'],
kanban: ['Trello', 'Notion', 'Asana', 'Monday.com']
};
return tools[system] || [];
};
// ============ COMPLETION SCREEN ============
form.configureCompletionScreen({
type: 'text',
title: () => `${getSystemEmoji(getWinningSystem())} Your Perfect Match: ${getSystemName(getWinningSystem())}`,
message: () => {
const system = getWinningSystem();
return `${getSystemDescription(system)} Download your personalized report for implementation tips and tool recommendations.`;
}
});
// ============ PAGES SETUP ============
const pages = form.addPages('quiz-pages', {
heightMode: 'current-page'
});
// ============ PAGE 1: Work Style ============
const page1 = pages.addPage('work-style', { mobileBreakpoint: 500 });
page1.addRow(row => {
row.addTextPanel('header1', {
label: 'Step 1 of 6: Your Work Style',
computedValue: () => 'How do you naturally approach your work?',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page1.addSpacer({ height: '24px' });
page1.addRow(row => {
row.addRadioButton('workApproach', {
label: 'When you have a big project, you prefer to:',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'break-down', name: '📝 Break it into detailed steps and next actions' },
{ id: 'sprints', name: '🍅 Work in focused bursts with breaks' },
{ id: 'schedule', name: '📅 Block specific times in my calendar' },
{ id: 'prioritize', name: '🎯 Identify what\'s truly important vs urgent' },
{ id: 'visualize', name: '📋 Create a visual board to track progress' }
],
onValueChange: (val) => {
if (val === 'break-down') updateScore('gtd', 3);
else if (val === 'sprints') updateScore('pomodoro', 3);
else if (val === 'schedule') updateScore('timeBlocking', 3);
else if (val === 'prioritize') updateScore('eisenhower', 3);
else if (val === 'visualize') updateScore('kanban', 3);
}
});
});
page1.addRow(row => {
row.addRadioButton('interruptions', {
label: 'How do you handle interruptions?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'capture', name: '📥 I capture them in an inbox to process later' },
{ id: 'ignore', name: '🚫 I need complete focus - interruptions derail me' },
{ id: 'reschedule', name: '🔄 I adjust my calendar and reschedule' },
{ id: 'evaluate', name: '🤔 I quickly evaluate if it\'s urgent/important' },
{ id: 'park', name: '📌 I add them to my "waiting" or "blocked" column' }
],
onValueChange: (val) => {
if (val === 'capture') updateScore('gtd', 2);
else if (val === 'ignore') updateScore('pomodoro', 2);
else if (val === 'reschedule') updateScore('timeBlocking', 2);
else if (val === 'evaluate') updateScore('eisenhower', 2);
else if (val === 'park') updateScore('kanban', 2);
}
});
});
// ============ PAGE 2: Challenges ============
const page2 = pages.addPage('challenges', { mobileBreakpoint: 500 });
page2.addRow(row => {
row.addTextPanel('header2', {
label: 'Step 2 of 6: Your Challenges',
computedValue: () => 'What productivity challenges do you face?',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page2.addSpacer({ height: '24px' });
page2.addRow(row => {
row.addSuggestionChips('biggestChallenges', {
label: 'What are your biggest productivity challenges? (Select up to 3)',
isRequired: true,
suggestions: [
{ id: 'overwhelm', name: '😵 Too many things to track' },
{ id: 'focus', name: '🎯 Maintaining focus' },
{ id: 'priorities', name: '❓ Knowing what to work on' },
{ id: 'time', name: '⏰ Not enough time' },
{ id: 'starting', name: '🚀 Getting started on tasks' },
{ id: 'progress', name: '📊 Seeing my progress' }
],
min: 1,
max: 3,
onValueChange: (val) => {
if (!val) return;
if (val.includes('overwhelm')) updateScore('gtd', 2);
if (val.includes('focus')) updateScore('pomodoro', 2);
if (val.includes('priorities')) updateScore('eisenhower', 2);
if (val.includes('time')) updateScore('timeBlocking', 2);
if (val.includes('starting')) updateScore('pomodoro', 1);
if (val.includes('progress')) updateScore('kanban', 2);
}
});
});
page2.addRow(row => {
row.addRadioButton('stressSource', {
label: 'What causes you the most stress about your work?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'forgetting', name: '🧠 Worrying I\'ll forget something important' },
{ id: 'distracted', name: '😣 Getting distracted and not finishing tasks' },
{ id: 'calendar', name: '📅 Chaotic days with no structure' },
{ id: 'urgent', name: '🔥 Everything feels equally urgent' },
{ id: 'stuck', name: '🚧 Tasks getting stuck or blocked' }
],
onValueChange: (val) => {
if (val === 'forgetting') updateScore('gtd', 2);
else if (val === 'distracted') updateScore('pomodoro', 2);
else if (val === 'calendar') updateScore('timeBlocking', 2);
else if (val === 'urgent') updateScore('eisenhower', 2);
else if (val === 'stuck') updateScore('kanban', 2);
}
});
});
// ============ PAGE 3: Preferences ============
const page3 = pages.addPage('preferences', { mobileBreakpoint: 500 });
page3.addRow(row => {
row.addTextPanel('header3', {
label: 'Step 3 of 6: Your Preferences',
computedValue: () => 'How do you like to organize your work?',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page3.addSpacer({ height: '24px' });
page3.addRow(row => {
row.addEmojiRating('structureLevel', {
label: 'How much structure do you need in your day?',
isRequired: true,
preset: 'custom',
emojis: [
{ id: 'minimal', emoji: '🌊', label: 'Go with flow' },
{ id: 'some', emoji: '📝', label: 'Some structure' },
{ id: 'moderate', emoji: '📋', label: 'Moderate' },
{ id: 'high', emoji: '📅', label: 'Well planned' },
{ id: 'strict', emoji: '⏰', label: 'Every minute' }
],
size: 'lg',
showLabels: true,
alignment: 'center',
onValueChange: (val) => {
if (val === 'minimal') { updateScore('gtd', 1); updateScore('kanban', 1); }
else if (val === 'some') { updateScore('eisenhower', 1); updateScore('kanban', 1); }
else if (val === 'moderate') { updateScore('gtd', 1); updateScore('pomodoro', 1); }
else if (val === 'high') updateScore('timeBlocking', 2);
else if (val === 'strict') updateScore('timeBlocking', 3);
}
});
});
page3.addRow(row => {
row.addRadioButton('visualPreference', {
label: 'How do you prefer to see your tasks?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'lists', name: '📝 Organized lists by context or project' },
{ id: 'timer', name: '⏱️ One task at a time with a timer' },
{ id: 'calendar', name: '📅 On my calendar as time blocks' },
{ id: 'quadrants', name: '🎯 Organized by importance/urgency' },
{ id: 'boards', name: '📋 Visual boards with columns' }
],
onValueChange: (val) => {
if (val === 'lists') updateScore('gtd', 2);
else if (val === 'timer') updateScore('pomodoro', 2);
else if (val === 'calendar') updateScore('timeBlocking', 2);
else if (val === 'quadrants') updateScore('eisenhower', 2);
else if (val === 'boards') updateScore('kanban', 2);
}
});
});
// ============ PAGE 4: Work Environment ============
const page4 = pages.addPage('environment', { mobileBreakpoint: 500 });
page4.addRow(row => {
row.addTextPanel('header4', {
label: 'Step 4 of 6: Work Environment',
computedValue: () => 'Tell us about your work context',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page4.addSpacer({ height: '24px' });
page4.addRow(row => {
row.addDropdown('workType', {
label: 'What best describes your work?',
isRequired: true,
options: [
{ id: 'knowledge', name: '💻 Knowledge work (writing, coding, designing)' },
{ id: 'meetings', name: '👥 Meeting-heavy (sales, management)' },
{ id: 'creative', name: '🎨 Creative projects' },
{ id: 'reactive', name: '📞 Reactive/support work' },
{ id: 'mixed', name: '🔄 Mix of everything' }
],
placeholder: 'Select work type',
onValueChange: (val) => {
if (val === 'knowledge') { updateScore('pomodoro', 2); updateScore('timeBlocking', 1); }
else if (val === 'meetings') { updateScore('timeBlocking', 2); updateScore('eisenhower', 1); }
else if (val === 'creative') { updateScore('kanban', 2); updateScore('pomodoro', 1); }
else if (val === 'reactive') { updateScore('gtd', 2); updateScore('eisenhower', 1); }
else if (val === 'mixed') { updateScore('gtd', 1); updateScore('kanban', 1); }
}
}, '1fr');
row.addSlider('meetingsPerDay', {
label: 'How many meetings do you have per day on average?',
isRequired: true,
min: 0,
max: 10,
step: 1,
unit: 'meetings',
defaultValue: 3,
onValueChange: (val) => {
if (val == null) return;
if (val >= 5) updateScore('timeBlocking', 2);
else if (val >= 3) updateScore('eisenhower', 1);
else if (val <= 2) updateScore('pomodoro', 1);
}
}, '1fr');
});
page4.addRow(row => {
row.addRadioButton('teamCollaboration', {
label: 'How much do you collaborate with others?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'solo', name: '🧑💻 Mostly solo work' },
{ id: 'some', name: '👥 Some collaboration' },
{ id: 'heavy', name: '🤝 Heavy team collaboration' },
{ id: 'manager', name: '👔 I manage/lead others' }
],
onValueChange: (val) => {
if (val === 'solo') { updateScore('pomodoro', 2); updateScore('gtd', 1); }
else if (val === 'some') { updateScore('gtd', 1); updateScore('kanban', 1); }
else if (val === 'heavy') { updateScore('kanban', 2); updateScore('timeBlocking', 1); }
else if (val === 'manager') { updateScore('eisenhower', 2); updateScore('kanban', 1); }
}
});
});
// ============ PAGE 5: Results ============
const page5 = pages.addPage('results', { mobileBreakpoint: 500 });
page5.addRow(row => {
row.addTextPanel('header5', {
label: 'Step 5 of 6: Your Perfect Match',
computedValue: () => 'Based on your answers, here\'s your ideal productivity system',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page5.addSpacer({ height: '24px' });
page5.addRow(row => {
row.addTextPanel('resultEmoji', {
computedValue: () => getSystemEmoji(getWinningSystem()),
customStyles: {
fontSize: '4rem',
textAlign: 'center'
}
});
});
page5.addRow(row => {
row.addTextPanel('resultSystem', {
computedValue: () => getSystemName(getWinningSystem()),
customStyles: {
fontSize: '1.5rem',
fontWeight: '800',
textAlign: 'center',
color: '#1e40af',
padding: '10px'
}
});
});
page5.addRow(row => {
row.addTextPanel('resultDescription', {
computedValue: () => getSystemDescription(getWinningSystem()),
customStyles: {
fontSize: '1rem',
color: '#4b5563',
textAlign: 'center',
padding: '15px',
background: '#f3f4f6',
borderRadius: '8px',
lineHeight: '1.6'
}
});
});
page5.addRow(row => {
row.addTextPanel('toolsHeader', {
computedValue: () => '🛠️ Recommended Tools:',
customStyles: {
fontSize: '1rem',
fontWeight: '600',
textAlign: 'center',
marginTop: '15px'
}
});
});
page5.addRow(row => {
row.addTextPanel('toolsList', {
computedValue: () => getTopTools(getWinningSystem()).join(' • '),
customStyles: {
fontSize: '0.95rem',
color: '#059669',
textAlign: 'center',
fontWeight: '500'
}
});
});
const scoreBreakdown = page5.addSubform('scoreBreakdown', {
title: '📊 All Systems Compatibility (click to expand)',
isCollapsible: true,
customStyles: {
marginTop: '1rem',
background: '#f9fafb',
borderRadius: '8px'
}
});
scoreBreakdown.addRow(row => {
row.addTextPanel('gtdScore', {
label: '📥 GTD',
computedValue: () => `${scores()['gtd'] || 0} points`,
customStyles: {
fontSize: '0.9rem',
padding: '8px 12px',
background: '#dbeafe',
borderRadius: '6px'
}
}, '1fr');
row.addTextPanel('pomodoroScore', {
label: '🍅 Pomodoro',
computedValue: () => `${scores()['pomodoro'] || 0} points`,
customStyles: {
fontSize: '0.9rem',
padding: '8px 12px',
background: '#fef3c7',
borderRadius: '6px'
}
}, '1fr');
});
scoreBreakdown.addRow(row => {
row.addTextPanel('timeBlockingScore', {
label: '📅 Time Blocking',
computedValue: () => `${scores()['timeBlocking'] || 0} points`,
customStyles: {
fontSize: '0.9rem',
padding: '8px 12px',
background: '#d1fae5',
borderRadius: '6px'
}
}, '1fr');
row.addTextPanel('eisenhowerScore', {
label: '🎯 Eisenhower',
computedValue: () => `${scores()['eisenhower'] || 0} points`,
customStyles: {
fontSize: '0.9rem',
padding: '8px 12px',
background: '#fce7f3',
borderRadius: '6px'
}
}, '1fr');
});
scoreBreakdown.addRow(row => {
row.addTextPanel('kanbanScore', {
label: '📋 Kanban',
computedValue: () => `${scores()['kanban'] || 0} points`,
customStyles: {
fontSize: '0.9rem',
padding: '8px 12px',
background: '#e0e7ff',
borderRadius: '6px'
}
}, '1fr');
row.addEmpty('1fr');
});
// ============ PAGE 6: Lead Capture ============
const page6 = pages.addPage('lead-capture', { mobileBreakpoint: 500 });
page6.addRow(row => {
row.addTextPanel('header6', {
label: 'Step 6 of 6: Get Your Guide',
computedValue: () => 'Enter your details to receive your personalized productivity guide',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page6.addSpacer({ height: '24px' });
page6.addRow(row => {
row.addTextbox('name', {
label: 'Your Name',
isRequired: true,
placeholder: 'Sam Taylor'
}, '1fr');
row.addEmail('email', {
label: 'Email',
isRequired: true,
placeholder: 'sam@email.com'
}, '1fr');
});
page6.addRow(row => {
row.addCheckboxList('consent', {
options: [
{ id: 'guide', name: '📄 Send me the detailed implementation guide', isRequired: true },
{ id: 'tips', name: '💡 Send me weekly productivity tips' },
{ id: 'tools', name: '🛠️ Notify me about tool discounts' }
],
defaultValue: ['guide'],
orientation: 'vertical'
});
});
// ============ PDF REPORT ============
form.configurePdf('productivity-guide', pdf => {
pdf.configure({
filename: 'productivity-system-guide.pdf',
pageSize: 'A4',
allowUserDownload: true,
downloadButtonLabel: '📄 Download Implementation Guide',
header: {
title: 'Your Productivity System Guide',
subtitle: `Perfect Match: ${getSystemName(getWinningSystem())}`
},
footer: {
text: 'Generated by FormTs Productivity Quiz',
showPageNumbers: true
}
});
pdf.addSection('Your Perfect Match', section => {
section.addRow(row => {
row.addField('System', getSystemName(getWinningSystem()));
row.addField('Compatibility', 'High Match');
});
section.addSpacer(10);
section.addText(getSystemDescription(getWinningSystem()));
});
pdf.addSection('Recommended Tools', section => {
const tools = getTopTools(getWinningSystem());
for (const tool of tools) {
section.addText(`• ${tool}`);
}
});
pdf.addPageBreak();
pdf.addSection('Getting Started Guide', section => {
const system = getWinningSystem();
if (system === 'gtd') {
section.addText('Week 1: Set up your capture system');
section.addText('Week 2: Define your projects and contexts');
section.addText('Week 3: Establish weekly review habit');
section.addText('Week 4: Refine and optimize');
} else if (system === 'pomodoro') {
section.addText('Week 1: Start with 4 pomodoros per day');
section.addText('Week 2: Track and analyze your focus patterns');
section.addText('Week 3: Optimize your break activities');
section.addText('Week 4: Scale to 6-8 pomodoros');
} else if (system === 'timeBlocking') {
section.addText('Week 1: Block your most important 2-3 hours');
section.addText('Week 2: Add buffer time between meetings');
section.addText('Week 3: Create recurring blocks for routines');
section.addText('Week 4: Protect your blocks ruthlessly');
} else if (system === 'eisenhower') {
section.addText('Week 1: Sort all tasks into the matrix');
section.addText('Week 2: Focus on Important/Not Urgent quadrant');
section.addText('Week 3: Learn to delegate effectively');
section.addText('Week 4: Eliminate time-wasters');
} else if (system === 'kanban') {
section.addText('Week 1: Set up your board (To Do, Doing, Done)');
section.addText('Week 2: Set WIP limits (max 3 in Doing)');
section.addText('Week 3: Add more columns as needed');
section.addText('Week 4: Review and optimize flow');
}
});
});
// ============ SUBMIT BUTTON ============
form.configureSubmitButton({
label: () => `${getSystemEmoji(getWinningSystem())} Get My ${getSystemName(getWinningSystem())} Guide`
});
form.configureSubmitBehavior({
sendToServer: true
});
}