export function remoteWorkReadinessQuiz(form: FormTs) {
form.setTitle(() => '🏠 Is Your Team Ready for Remote Work?');
// ============ SCORING SYSTEM ============
const scores = form.state<Record<string, number>>({});
const updateScore = (category: string, points: number) => {
scores.update(current => ({ ...current, [category]: points }));
};
const getTotalScore = () => {
const s = scores();
return Object.values(s).reduce((sum, val) => sum + (val || 0), 0);
};
const getMaxScore = () => 100;
const getScorePercentage = () => Math.round((getTotalScore() / getMaxScore()) * 100);
const getReadinessLevel = (): 'notReady' | 'foundationNeeded' | 'almostReady' | 'fullyReady' => {
const pct = getScorePercentage();
if (pct >= 80) return 'fullyReady';
if (pct >= 60) return 'almostReady';
if (pct >= 40) return 'foundationNeeded';
return 'notReady';
};
const getReadinessLabel = () => {
const level = getReadinessLevel();
const labels = {
notReady: '🚫 Not Ready - Critical Gaps',
foundationNeeded: '⚠️ Foundation Building Needed',
almostReady: '🏠 Almost Ready - Minor Tweaks',
fullyReady: '✅ Fully Remote-Ready!'
};
return labels[level];
};
const getReadinessColor = () => {
const level = getReadinessLevel();
const colors = {
notReady: '#dc2626',
foundationNeeded: '#ea580c',
almostReady: '#ca8a04',
fullyReady: '#16a34a'
};
return colors[level];
};
// ============ COMPLETION SCREEN ============
form.configureCompletionScreen({
type: 'text',
title: () => getReadinessLabel(),
message: () => {
const level = getReadinessLevel();
const pct = getScorePercentage();
const messages = {
notReady: `Your remote readiness score is ${pct}%. Your team has significant gaps in technology, processes, and culture that need to be addressed before successful remote work is possible. Review your detailed report for a prioritized action plan.`,
foundationNeeded: `Your remote readiness score is ${pct}%. You have some elements in place but need to strengthen your foundation. Focus on the key gaps identified in your report before expanding remote work.`,
almostReady: `Your remote readiness score is ${pct}%. You're close to fully remote-ready! A few adjustments will help your team thrive. Check your report for optimization opportunities.`,
fullyReady: `Excellent! Your remote readiness score is ${pct}%. Your team has the tools, processes, and culture for successful remote work. Download your report for best practices to maintain and improve.`
};
return messages[level];
}
});
// ============ PAGES SETUP ============
const pages = form.addPages('quiz-pages', {
heightMode: 'current-page'
});
// ============ PAGE 1: Team Profile ============
const page1 = pages.addPage('team-profile', { mobileBreakpoint: 500 });
page1.addRow(row => {
row.addTextPanel('header1', {
label: 'Step 1 of 6: Team Profile',
computedValue: () => 'Tell us about your team and current work setup',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page1.addSpacer({ height: '24px' });
page1.addRow(row => {
row.addSlider('teamSize', {
label: 'How many people are on your team?',
isRequired: true,
min: 2,
max: 100,
step: 1,
defaultValue: 10,
showValue: true,
unit: 'people'
});
});
page1.addRow(row => {
row.addRadioButton('currentSetup', {
label: 'What is your current work arrangement?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'fullOffice', name: '🏢 Fully in-office' },
{ id: 'hybrid', name: '🔀 Hybrid (some days remote)' },
{ id: 'mostlyRemote', name: '🏠 Mostly remote (occasional office)' },
{ id: 'fullyRemote', name: '🌍 Fully remote' }
]
});
});
page1.addRow(row => {
row.addDropdown('industry', {
label: 'What industry is your team in?',
isRequired: true,
options: [
{ id: 'tech', name: 'Technology / Software' },
{ id: 'finance', name: 'Finance / Banking' },
{ id: 'healthcare', name: 'Healthcare' },
{ id: 'education', name: 'Education' },
{ id: 'marketing', name: 'Marketing / Media' },
{ id: 'professional', name: 'Professional Services' },
{ id: 'manufacturing', name: 'Manufacturing' },
{ id: 'retail', name: 'Retail / E-commerce' },
{ id: 'other', name: 'Other' }
],
placeholder: 'Select industry'
}, '1fr');
row.addDropdown('workType', {
label: 'Primary type of work',
isRequired: true,
options: [
{ id: 'knowledge', name: 'Knowledge work (writing, analysis, design)' },
{ id: 'creative', name: 'Creative work (design, content, video)' },
{ id: 'customerFacing', name: 'Customer-facing (sales, support)' },
{ id: 'development', name: 'Software development' },
{ id: 'management', name: 'Management / Leadership' },
{ id: 'operations', name: 'Operations / Admin' },
{ id: 'mixed', name: 'Mixed / Various' }
],
placeholder: 'Select work type'
}, '1fr');
});
// ============ PAGE 2: Technology & Tools ============
const page2 = pages.addPage('technology', { mobileBreakpoint: 500 });
page2.addRow(row => {
row.addTextPanel('header2', {
label: 'Step 2 of 6: Technology & Tools',
computedValue: () => 'Remote work requires the right technology stack',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page2.addSpacer({ height: '24px' });
page2.addRow(row => {
row.addMatrixQuestion('tools', {
label: 'Which of these tools does your team currently use?',
isRequired: true,
rows: [
{ id: 'videoConf', label: 'Video Conferencing', description: 'Zoom, Teams, Google Meet' },
{ id: 'chat', label: 'Team Chat', description: 'Slack, Teams, Discord' },
{ id: 'projectMgmt', label: 'Project Management', description: 'Asana, Monday, Jira' },
{ id: 'fileShare', label: 'File Sharing', description: 'Google Drive, Dropbox, SharePoint' },
{ id: 'documentation', label: 'Documentation', description: 'Notion, Confluence, Wiki' }
],
columns: [
{ id: 'no', label: 'No' },
{ id: 'limited', label: 'Limited' },
{ id: 'yes', label: 'Yes' }
],
selectionMode: 'single',
striped: true,
fullWidth: true,
onValueChange: (val) => {
if (!val) return;
let points = 0;
for (const [tool, answer] of Object.entries(val)) {
if (answer === 'yes') points += 4;
else if (answer === 'limited') points += 2;
}
updateScore('tools', Math.min(points, 20));
}
});
});
page2.addRow(row => {
row.addRadioButton('cloudAccess', {
label: 'Can employees access all work systems from anywhere?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'full', name: '☁️ Yes, everything is cloud-based or VPN accessible' },
{ id: 'most', name: '🔒 Mostly - some systems require office access' },
{ id: 'limited', name: '⚠️ Limited - many systems are office-only' },
{ id: 'none', name: '❌ No - most work requires being in the office' }
],
onValueChange: (val) => {
const points = { full: 10, most: 7, limited: 3, none: 0 };
updateScore('access', points[val as keyof typeof points] || 0);
}
});
});
page2.addRow(row => {
row.addTextPanel('techScore', {
computedValue: () => {
const s = scores();
const score = (s['tools'] || 0) + (s['access'] || 0);
return `💻 Technology Score: ${score}/30`;
},
customStyles: {
fontSize: '1rem',
fontWeight: '600',
color: '#1e40af',
textAlign: 'center',
padding: '12px',
background: '#dbeafe',
borderRadius: '8px',
marginTop: '1rem'
}
});
});
// ============ PAGE 3: Communication & Collaboration ============
const page3 = pages.addPage('communication', { mobileBreakpoint: 500 });
page3.addRow(row => {
row.addTextPanel('header3', {
label: 'Step 3 of 6: Communication & Collaboration',
computedValue: () => 'Effective communication is the backbone of remote teams',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page3.addSpacer({ height: '24px' });
page3.addRow(row => {
row.addRadioButton('asyncCulture', {
label: 'How does your team handle asynchronous communication?',
isRequired: true,
orientation: 'vertical',
tooltip: 'Async = communication that doesn\'t require immediate response (email, docs, recorded videos)',
options: [
{ id: 'strong', name: '✅ Strong async culture - detailed written updates, recorded meetings' },
{ id: 'moderate', name: '📝 Some async - mix of meetings and written communication' },
{ id: 'weak', name: '🗣️ Mostly synchronous - rely heavily on meetings' },
{ id: 'none', name: '❌ No async practices - everything is real-time' }
],
onValueChange: (val) => {
const points = { strong: 10, moderate: 6, weak: 3, none: 0 };
updateScore('async', points[val as keyof typeof points] || 0);
}
});
});
page3.addRow(row => {
row.addRadioButton('documentation', {
label: 'How well documented are your team\'s processes and decisions?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'excellent', name: '📚 Excellent - comprehensive wiki, SOPs, decision logs' },
{ id: 'good', name: '📝 Good - key processes documented, some gaps' },
{ id: 'basic', name: '📋 Basic - minimal documentation, tribal knowledge' },
{ id: 'none', name: '❌ None - information lives in people\'s heads' }
],
onValueChange: (val) => {
const points = { excellent: 10, good: 7, basic: 3, none: 0 };
updateScore('docs', points[val as keyof typeof points] || 0);
}
});
});
page3.addRow(row => {
row.addRadioButton('meetings', {
label: 'How effective are your current team meetings?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'efficient', name: '✅ Efficient - clear agendas, action items, recorded' },
{ id: 'okay', name: '😐 Okay - somewhat organized, room for improvement' },
{ id: 'chaotic', name: '😰 Chaotic - no structure, too many meetings' },
{ id: 'minimal', name: '❓ We barely have team meetings' }
],
onValueChange: (val) => {
const points = { efficient: 5, okay: 3, chaotic: 1, minimal: 2 };
updateScore('meetings', points[val as keyof typeof points] || 0);
}
});
});
// ============ PAGE 4: Management & Accountability ============
const page4 = pages.addPage('management', { mobileBreakpoint: 500 });
page4.addRow(row => {
row.addTextPanel('header4', {
label: 'Step 4 of 6: Management & Accountability',
computedValue: () => 'Remote teams need clear expectations and trust',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page4.addSpacer({ height: '24px' });
page4.addRow(row => {
row.addRadioButton('performanceTracking', {
label: 'How do you measure team performance?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'outcomes', name: '🎯 Outcomes-based - clear goals, OKRs, deliverables' },
{ id: 'mixed', name: '📊 Mix of outcomes and activity tracking' },
{ id: 'activity', name: '⏱️ Activity-based - hours worked, tasks completed' },
{ id: 'unclear', name: '❓ Unclear or informal performance expectations' }
],
onValueChange: (val) => {
const points = { outcomes: 10, mixed: 6, activity: 3, unclear: 0 };
updateScore('performance', points[val as keyof typeof points] || 0);
}
});
});
page4.addRow(row => {
row.addRadioButton('trustLevel', {
label: 'How would you describe the trust level between managers and team?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'high', name: '💚 High trust - autonomy, no micromanagement' },
{ id: 'moderate', name: '💛 Moderate - some autonomy with regular check-ins' },
{ id: 'low', name: '🟠 Low - frequent check-ins, close monitoring' },
{ id: 'veryLow', name: '🔴 Very low - heavy supervision, distrust of remote work' }
],
onValueChange: (val) => {
const points = { high: 10, moderate: 6, low: 2, veryLow: 0 };
updateScore('trust', points[val as keyof typeof points] || 0);
}
});
});
page4.addRow(row => {
row.addRadioButton('onboarding', {
label: 'How prepared are you to onboard new hires remotely?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'ready', name: '✅ Ready - structured remote onboarding process' },
{ id: 'mostly', name: '📋 Mostly - can adapt current onboarding' },
{ id: 'needsWork', name: '⚠️ Needs work - onboarding is currently in-person' },
{ id: 'notReady', name: '❌ Not ready - no remote onboarding capability' }
],
onValueChange: (val) => {
const points = { ready: 5, mostly: 3, needsWork: 1, notReady: 0 };
updateScore('onboarding', points[val as keyof typeof points] || 0);
}
});
});
// ============ PAGE 5: Culture & Wellbeing ============
const page5 = pages.addPage('culture', { mobileBreakpoint: 500 });
page5.addRow(row => {
row.addTextPanel('header5', {
label: 'Step 5 of 6: Culture & Wellbeing',
computedValue: () => 'Remote teams need intentional culture building',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page5.addSpacer({ height: '24px' });
page5.addRow(row => {
row.addSuggestionChips('culturePractices', {
label: 'Which of these practices does your team have? (Select all)',
suggestions: [
{ id: 'virtual-social', name: '🎉 Virtual social events' },
{ id: 'coffee-chats', name: '☕ Random coffee chats' },
{ id: 'wellness', name: '🧘 Wellness programs' },
{ id: 'recognition', name: '🏆 Recognition programs' },
{ id: 'pto-policy', name: '🌴 Clear PTO policy' },
{ id: 'flex-hours', name: '⏰ Flexible hours' },
{ id: 'boundaries', name: '🚫 Work-life boundaries' },
{ id: 'none', name: '❌ None of these' }
],
onValueChange: (vals) => {
if (!vals || vals.includes('none') || vals.length === 0) {
updateScore('culture', 0);
return;
}
updateScore('culture', Math.min(vals.length * 2, 10));
}
});
});
page5.addRow(row => {
row.addRadioButton('burnoutAwareness', {
label: 'How does management address remote work burnout?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'proactive', name: '✅ Proactive - regular check-ins, workload monitoring' },
{ id: 'reactive', name: '📋 Reactive - address issues when raised' },
{ id: 'minimal', name: '😐 Minimal - occasional wellness reminders' },
{ id: 'none', name: '❌ Not addressed - burnout is not discussed' }
],
onValueChange: (val) => {
const points = { proactive: 5, reactive: 3, minimal: 1, none: 0 };
updateScore('burnout', points[val as keyof typeof points] || 0);
}
});
});
page5.addRow(row => {
row.addRatingScale('teamConnection', {
label: 'How connected do team members feel to each other?',
isRequired: true,
preset: 'custom',
min: 1,
max: 5,
lowLabel: 'Very disconnected',
highLabel: 'Very connected',
variant: 'buttons',
alignment: 'center',
onValueChange: (val) => {
updateScore('connection', val || 0);
}
});
});
// ============ PAGE 6: Results ============
const page6 = pages.addPage('results', { mobileBreakpoint: 500 });
page6.addRow(row => {
row.addTextPanel('header6', {
label: 'Step 6 of 6: Your Remote Readiness',
computedValue: () => 'Here\'s your team\'s remote work assessment',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page6.addSpacer({ height: '24px' });
page6.addRow(row => {
row.addTextPanel('readinessLevel', {
computedValue: () => getReadinessLabel(),
customStyles: () => ({
fontSize: '1.6rem',
fontWeight: '800',
textAlign: 'center',
color: getReadinessColor(),
padding: '20px',
background: '#f9fafb',
borderRadius: '12px',
border: `3px solid ${getReadinessColor()}`
})
});
});
page6.addRow(row => {
row.addTextPanel('scoreDisplay', {
computedValue: () => `Remote Readiness Score: ${getScorePercentage()}%`,
customStyles: {
fontSize: '1.2rem',
fontWeight: '600',
color: '#374151',
textAlign: 'center',
marginTop: '10px'
}
});
});
// Score breakdown
const breakdownSection = page6.addSubform('breakdown', {
title: '📊 Category Breakdown',
isCollapsible: true,
customStyles: {
marginTop: '1.5rem',
background: '#f9fafb',
borderRadius: '8px'
}
});
breakdownSection.addRow(row => {
row.addTextPanel('techCategory', {
label: '💻 Technology',
computedValue: () => {
const s = scores();
const score = (s['tools'] || 0) + (s['access'] || 0);
return `${score}/30`;
},
customStyles: { padding: '8px 12px', background: '#dbeafe', borderRadius: '6px', marginBottom: '8px' }
}, '1fr');
row.addTextPanel('commCategory', {
label: '💬 Communication',
computedValue: () => {
const s = scores();
const score = (s['async'] || 0) + (s['docs'] || 0) + (s['meetings'] || 0);
return `${score}/25`;
},
customStyles: { padding: '8px 12px', background: '#dbeafe', borderRadius: '6px', marginBottom: '8px' }
}, '1fr');
});
breakdownSection.addRow(row => {
row.addTextPanel('mgmtCategory', {
label: '👔 Management',
computedValue: () => {
const s = scores();
const score = (s['performance'] || 0) + (s['trust'] || 0) + (s['onboarding'] || 0);
return `${score}/25`;
},
customStyles: { padding: '8px 12px', background: '#dbeafe', borderRadius: '6px', marginBottom: '8px' }
}, '1fr');
row.addTextPanel('cultureCategory', {
label: '🌱 Culture & Wellbeing',
computedValue: () => {
const s = scores();
const score = (s['culture'] || 0) + (s['burnout'] || 0) + (s['connection'] || 0);
return `${score}/20`;
},
customStyles: { padding: '8px 12px', background: '#dbeafe', borderRadius: '6px', marginBottom: '8px' }
}, '1fr');
});
// ============ PAGE 7: Lead Capture ============
const page7 = pages.addPage('lead-capture', { mobileBreakpoint: 500 });
page7.addRow(row => {
row.addTextPanel('header7', {
label: 'Step 7 of 7: Get Your Remote Work Playbook',
computedValue: () => 'Enter your details to receive your personalized recommendations',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page7.addSpacer({ height: '24px' });
page7.addRow(row => {
row.addTextbox('name', {
label: 'Your Name',
isRequired: true,
placeholder: 'Jane Manager'
}, '1fr');
row.addEmail('email', {
label: 'Work Email',
isRequired: true,
placeholder: 'jane@company.com'
}, '1fr');
});
page7.addRow(row => {
row.addTextbox('company', {
label: 'Company Name',
placeholder: 'Remote Corp'
}, '1fr');
row.addDropdown('role', {
label: 'Your Role',
options: [
{ id: 'executive', name: 'Executive / C-Suite' },
{ id: 'hr', name: 'HR / People Ops' },
{ id: 'manager', name: 'Manager / Team Lead' },
{ id: 'ops', name: 'Operations' },
{ id: 'employee', name: 'Individual Contributor' },
{ id: 'consultant', name: 'Consultant' }
],
placeholder: 'Select role'
}, '1fr');
});
page7.addRow(row => {
row.addCheckboxList('consent', {
options: [
{
id: 'report',
name: '📄 Send me the remote readiness report',
isRequired: true
},
{
id: 'playbook',
name: '📚 Send me the remote work playbook'
},
{
id: 'consultation',
name: '📞 I\'d like a free remote work consultation'
}
],
defaultValue: ['report'],
orientation: 'vertical'
});
});
// ============ PDF REPORT ============
form.configurePdf('remote-readiness-report', pdf => {
pdf.configure({
filename: 'remote-work-readiness-report.pdf',
pageSize: 'A4',
allowUserDownload: true,
downloadButtonLabel: '📄 Download Readiness Report',
header: {
title: 'Remote Work Readiness Assessment',
subtitle: 'Your Team\'s Personalized Analysis'
},
footer: {
text: 'Generated by FormTs Remote Readiness Quiz',
showPageNumbers: true
}
});
pdf.addSection('Executive Summary', section => {
section.addRow(row => {
row.addField('Readiness Level', getReadinessLabel());
row.addField('Score', `${getScorePercentage()}%`);
});
});
pdf.addSection('Category Breakdown', section => {
const s = scores();
section.addTable(
['Category', 'Score', 'Max', 'Status'],
[
['Technology & Tools', `${(s['tools'] || 0) + (s['access'] || 0)}`, '30', ((s['tools'] || 0) + (s['access'] || 0)) >= 20 ? '✅ Good' : '⚠️ Improve'],
['Communication', `${(s['async'] || 0) + (s['docs'] || 0) + (s['meetings'] || 0)}`, '25', ((s['async'] || 0) + (s['docs'] || 0)) >= 15 ? '✅ Good' : '⚠️ Improve'],
['Management', `${(s['performance'] || 0) + (s['trust'] || 0) + (s['onboarding'] || 0)}`, '25', ((s['performance'] || 0) + (s['trust'] || 0)) >= 15 ? '✅ Good' : '⚠️ Improve'],
['Culture & Wellbeing', `${(s['culture'] || 0) + (s['burnout'] || 0) + (s['connection'] || 0)}`, '20', ((s['culture'] || 0) + (s['burnout'] || 0)) >= 10 ? '✅ Good' : '⚠️ Improve']
]
);
});
pdf.addPageBreak();
pdf.addSection('Priority Actions', section => {
const s = scores();
const level = getReadinessLevel();
if ((s['tools'] || 0) < 15) {
section.addText('1. TECHNOLOGY GAPS (High Priority)');
section.addText(' - Implement core collaboration tools (video, chat, project mgmt)');
section.addText(' - Ensure cloud access to all critical systems');
section.addText(' - Provide equipment stipends for home offices');
section.addSpacer(10);
}
if ((s['async'] || 0) + (s['docs'] || 0) < 15) {
section.addText('2. COMMUNICATION IMPROVEMENTS');
section.addText(' - Establish async-first culture guidelines');
section.addText(' - Create documentation templates and wiki');
section.addText(' - Record all meetings for async viewing');
section.addSpacer(10);
}
if ((s['trust'] || 0) < 7) {
section.addText('3. TRUST & MANAGEMENT');
section.addText(' - Shift to outcomes-based performance metrics');
section.addText(' - Train managers on remote leadership');
section.addText(' - Reduce monitoring, increase autonomy');
section.addSpacer(10);
}
if ((s['culture'] || 0) + (s['burnout'] || 0) < 10) {
section.addText('4. CULTURE & WELLBEING');
section.addText(' - Implement virtual social events');
section.addText(' - Create explicit work-life boundaries');
section.addText(' - Regular wellbeing check-ins');
}
});
pdf.addSection('Remote Work Best Practices', section => {
section.addText('Daily Practices:');
section.addText('• Start/end of day check-ins in team chat');
section.addText('• Keep calendars updated with availability');
section.addText('• Use status indicators (away, focus, available)');
section.addSpacer(10);
section.addText('Weekly Practices:');
section.addText('• Team sync meeting with clear agenda');
section.addText('• 1:1s between managers and reports');
section.addText('• Async weekly updates/summaries');
section.addSpacer(10);
section.addText('Monthly Practices:');
section.addText('• Virtual social event');
section.addText('• Process retrospective');
section.addText('• Wellbeing pulse check');
});
});
// ============ SUBMIT BUTTON ============
form.configureSubmitButton({
label: () => `📄 Get My Remote Work Report (${getScorePercentage()}%)`
});
form.configureSubmitBehavior({
sendToServer: true
});
}