export function networkingFeedbackSurvey(form: FormTs) {
// Networking Experience Feedback - Event networking session evaluation
// Demonstrates: Integer, Slider, MatrixQuestion, StarRating, EmojiRating, RadioButton, conditional visibility
// ============================================
// HEADER
// ============================================
form.addRow(row => {
row.addTextPanel('header', {
label: 'Networking Feedback',
computedValue: () => 'Help us improve networking opportunities at future events.',
customStyles: {
backgroundColor: '#2563eb',
color: 'white',
padding: '24px',
borderRadius: '12px',
textAlign: 'center'
}
});
});
// ============================================
// SECTION 1: Event Details
// ============================================
const eventSection = form.addSubform('eventSection', {
title: 'Event Information'
});
eventSection.addRow(row => {
row.addTextbox('eventName', {
label: 'Event name',
placeholder: 'e.g., TechConnect 2024'
}, '1fr');
row.addDropdown('sessionType', {
label: 'Networking format',
options: [
{ id: 'reception', name: 'Open Reception/Cocktails' },
{ id: 'speed', name: 'Speed Networking' },
{ id: 'roundtable', name: 'Roundtable Discussion' },
{ id: 'structured', name: 'Structured Introductions' },
{ id: 'lunch', name: 'Networking Lunch/Dinner' },
{ id: 'mixed', name: 'Mixed/Multiple Formats' }
]
}, '1fr');
});
// ============================================
// SECTION 2: Connections Made
// ============================================
const connectionsSection = form.addSubform('connectionsSection', {
title: 'Connections Made'
});
connectionsSection.addRow(row => {
row.addInteger('connectionsCount', {
label: 'How many new people did you meet?',
min: 0,
max: 100,
placeholder: '0',
defaultValue: 0
}, '1fr');
row.addInteger('meaningfulConnections', {
label: 'How many were meaningful connections?',
min: 0,
max: () => connectionsSection.integer('connectionsCount')?.value() || 100,
placeholder: '0',
defaultValue: 0
}, '1fr');
});
connectionsSection.addRow(row => {
row.addTextPanel('connectionRatio', {
computedValue: () => {
const total = connectionsSection.integer('connectionsCount')?.value() || 0;
const meaningful = connectionsSection.integer('meaningfulConnections')?.value() || 0;
if (total === 0) return '👥 Start networking to make connections!';
const percentage = Math.round((meaningful / total) * 100);
let emoji = percentage >= 50 ? '🌟' : percentage >= 25 ? '👍' : '🎯';
return `${emoji} Quality ratio: ${percentage}% meaningful connections (${meaningful}/${total})`;
},
customStyles: () => {
const total = connectionsSection.integer('connectionsCount')?.value() || 0;
const meaningful = connectionsSection.integer('meaningfulConnections')?.value() || 0;
const percentage = total > 0 ? (meaningful / total) * 100 : 0;
const base = { padding: '12px', borderRadius: '8px', textAlign: 'center', fontSize: '14px' };
if (total === 0) return { ...base, backgroundColor: '#f3f4f6' };
if (percentage >= 50) return { ...base, backgroundColor: '#d1fae5', color: '#065f46' };
if (percentage >= 25) return { ...base, backgroundColor: '#fef3c7', color: '#92400e' };
return { ...base, backgroundColor: '#fee2e2', color: '#991b1b' };
}
});
});
connectionsSection.addRow(row => {
row.addCheckboxList('connectionTypes', {
label: 'Who did you connect with? (Select all that apply)',
options: [
{ id: 'peers', name: 'Peers in similar roles' },
{ id: 'mentors', name: 'Potential mentors' },
{ id: 'vendors', name: 'Vendors/Service providers' },
{ id: 'clients', name: 'Potential clients/customers' },
{ id: 'partners', name: 'Potential partners' },
{ id: 'recruiters', name: 'Recruiters/HR' },
{ id: 'speakers', name: 'Speakers/Presenters' },
{ id: 'other', name: 'Other professionals' }
],
orientation: 'vertical'
});
});
// ============================================
// SECTION 3: Overall Experience
// ============================================
const experienceSection = form.addSubform('experienceSection', {
title: 'Networking Experience',
customStyles: () => {
const rating = experienceSection.starRating('overall')?.value();
if (rating === null || rating === undefined) return { padding: '16px' };
if (rating >= 4) return { backgroundColor: '#dbeafe', padding: '16px', borderRadius: '8px' };
if (rating >= 3) return { backgroundColor: '#fef3c7', padding: '16px', borderRadius: '8px' };
return { backgroundColor: '#fee2e2', padding: '16px', borderRadius: '8px' };
}
});
experienceSection.addRow(row => {
row.addStarRating('overall', {
label: 'Rate your overall networking experience',
maxStars: 5,
size: 'xl',
alignment: 'center',
showCounter: true,
showConfettiOnMax: true
});
});
experienceSection.addRow(row => {
row.addEmojiRating('comfort', {
label: 'How comfortable did you feel networking?',
preset: 'satisfaction',
size: 'md',
showLabels: true,
alignment: 'center',
isVisible: () => experienceSection.starRating('overall')?.value() !== null
});
});
// ============================================
// SECTION 4: Quality Assessment Matrix
// ============================================
const qualitySection = form.addSubform('qualitySection', {
title: 'Networking Quality',
isVisible: () => experienceSection.starRating('overall')?.value() !== null
});
qualitySection.addRow(row => {
row.addMatrixQuestion('qualityMatrix', {
label: 'Rate the following aspects of networking',
rows: [
{ id: 'atmosphere', label: 'Atmosphere conducive to conversations', isRequired: true },
{ id: 'time', label: 'Adequate time for networking' },
{ id: 'space', label: 'Physical space & layout' },
{ id: 'facilitation', label: 'Facilitation/ice-breakers' },
{ id: 'diversity', label: 'Diversity of attendees' },
{ id: 'relevance', label: 'Relevance of attendees to my goals' }
],
columns: [
{ id: 'poor', label: 'Poor' },
{ id: 'fair', label: 'Fair' },
{ id: 'good', label: 'Good' },
{ id: 'excellent', label: 'Excellent' },
{ id: 'na', label: 'N/A' }
],
striped: true,
fullWidth: true
});
});
// ============================================
// SECTION 5: Conversation Quality
// ============================================
const conversationSection = form.addSubform('conversationSection', {
title: 'Conversation Quality',
isVisible: () => experienceSection.starRating('overall')?.value() !== null
});
conversationSection.addRow(row => {
row.addSlider('conversationDepth', {
label: 'Average depth of conversations',
min: 1,
max: 5,
step: 1,
showValue: true,
defaultValue: 3
});
});
conversationSection.addRow(row => {
row.addTextPanel('depthLabel', {
computedValue: () => {
const depth = conversationSection.slider('conversationDepth')?.value() || 3;
const labels = [
'🗣️ Surface-level small talk',
'💬 Brief introductions',
'🤝 Professional discussions',
'💡 Valuable exchanges',
'🌟 Deep, meaningful connections'
];
return labels[depth - 1];
},
customStyles: {
backgroundColor: '#eff6ff',
padding: '10px',
borderRadius: '6px',
textAlign: 'center',
fontSize: '14px'
}
});
});
conversationSection.addRow(row => {
row.addStarRating('conversationValue', {
label: 'Value of conversations for your goals',
maxStars: 5,
size: 'md',
alignment: 'left'
}, '1fr');
row.addStarRating('followUpIntent', {
label: 'Likelihood of following up with new contacts',
maxStars: 5,
size: 'md',
alignment: 'left'
}, '1fr');
});
// ============================================
// SECTION 6: Business Value
// ============================================
const valueSection = form.addSubform('valueSection', {
title: 'Potential Business Value',
isVisible: () => {
const connections = connectionsSection.integer('meaningfulConnections')?.value();
return connections !== null && connections !== undefined && connections > 0;
},
customStyles: { backgroundColor: '#f0fdf4', padding: '16px', borderRadius: '8px' }
});
valueSection.addRow(row => {
row.addCheckboxList('potentialOutcomes', {
label: 'What potential outcomes do you foresee from connections made?',
options: [
{ id: 'partnership', name: 'Potential partnership' },
{ id: 'business', name: 'Business opportunity' },
{ id: 'referral', name: 'Referral/introduction' },
{ id: 'mentorship', name: 'Mentorship opportunity' },
{ id: 'job', name: 'Job/career opportunity' },
{ id: 'learning', name: 'Learning/knowledge sharing' },
{ id: 'friendship', name: 'Professional friendship' },
{ id: 'none', name: 'None expected' }
],
orientation: 'vertical'
});
});
valueSection.addRow(row => {
row.addThumbRating('worthTime', {
label: 'Was the networking time well spent?',
size: 'lg',
showLabels: true,
upLabel: 'Definitely!',
downLabel: 'Not really',
alignment: 'center'
});
});
// ============================================
// SECTION 7: Format Preference
// ============================================
const formatSection = form.addSubform('formatSection', {
title: 'Format Preferences',
isVisible: () => experienceSection.starRating('overall')?.value() !== null
});
formatSection.addRow(row => {
row.addRadioButton('preferredFormat', {
label: 'Which networking format do you prefer?',
options: [
{ id: 'structured', name: 'Structured (assigned tables, timed rotations)' },
{ id: 'semiStructured', name: 'Semi-structured (ice-breakers, then open)' },
{ id: 'open', name: 'Open/Unstructured (free mingling)' },
{ id: 'thematic', name: 'Thematic groups (by interest/topic)' },
{ id: 'mixed', name: 'Mix of formats' }
],
orientation: 'vertical'
});
});
// ============================================
// SECTION 8: Open Feedback
// ============================================
const feedbackSection = form.addSubform('feedbackSection', {
title: 'Additional Thoughts',
isVisible: () => experienceSection.starRating('overall')?.value() !== null
});
feedbackSection.addRow(row => {
row.addTextarea('highlights', {
label: 'What made the networking valuable for you?',
placeholder: 'Share your networking highlights...',
rows: 2,
autoExpand: true,
isVisible: () => {
const rating = experienceSection.starRating('overall')?.value();
return rating !== null && rating !== undefined && rating >= 4;
}
});
});
feedbackSection.addRow(row => {
row.addTextarea('improvements', {
label: 'How could we improve networking opportunities?',
placeholder: 'Your suggestions for better networking...',
rows: 2,
autoExpand: true
});
});
// ============================================
// SECTION 9: Summary
// ============================================
const summarySection = form.addSubform('summarySection', {
title: 'Your Networking Summary',
isVisible: () => experienceSection.starRating('overall')?.value() !== null
});
summarySection.addRow(row => {
row.addTextPanel('summary', {
computedValue: () => {
const overall = experienceSection.starRating('overall')?.value();
const total = connectionsSection.integer('connectionsCount')?.value() || 0;
const meaningful = connectionsSection.integer('meaningfulConnections')?.value() || 0;
const depth = conversationSection.slider('conversationDepth')?.value();
const followUp = conversationSection.starRating('followUpIntent')?.value();
const worthIt = valueSection.thumbRating('worthTime')?.value();
const connectionTypes = connectionsSection.checkboxList('connectionTypes')?.value() || [];
const outcomes = valueSection.checkboxList('potentialOutcomes')?.value() || [];
if (overall === null || overall === undefined) return '';
let emoji = overall >= 4 ? '🤝' : overall >= 3 ? '👥' : '😔';
let status = overall >= 4 ? 'Great Networking!' : overall >= 3 ? 'Decent Experience' : 'Room for Improvement';
let summary = `${emoji} Networking Summary\n`;
summary += `${'═'.repeat(25)}\n\n`;
summary += `⭐ Overall: ${overall}/5 (${status})\n`;
summary += `👥 Connections: ${total} total, ${meaningful} meaningful\n`;
if (total > 0) {
const ratio = Math.round((meaningful / total) * 100);
summary += `📊 Quality: ${ratio}% meaningful\n`;
}
if (depth) {
const depthLabels = ['Surface', 'Brief', 'Professional', 'Valuable', 'Deep'];
summary += `💬 Depth: ${depthLabels[depth - 1]}\n`;
}
if (followUp) {
summary += `📧 Follow-up intent: ${followUp}/5\n`;
}
if (connectionTypes.length > 0) {
summary += `\n🔗 Met: ${connectionTypes.length} types of contacts`;
}
if (outcomes.length > 0 && !outcomes.includes('none')) {
summary += `\n💼 Potential: ${outcomes.length} outcomes`;
}
if (worthIt) {
summary += `\n\n${worthIt === 'up' ? '✅ Time well spent!' : '❌ Could be better'}`;
}
return summary;
},
customStyles: () => {
const rating = experienceSection.starRating('overall')?.value();
const base = {
padding: '16px',
borderRadius: '8px',
whiteSpace: 'pre-wrap',
fontFamily: 'monospace',
fontSize: '13px'
};
if (rating !== null && rating !== undefined && rating >= 4) {
return { ...base, backgroundColor: '#dbeafe', borderLeft: '4px solid #2563eb' };
} else if (rating !== null && rating !== undefined && rating <= 2) {
return { ...base, backgroundColor: '#fee2e2', borderLeft: '4px solid #ef4444' };
}
return { ...base, backgroundColor: '#fef3c7', borderLeft: '4px solid #f59e0b' };
}
});
});
// ============================================
// FORM CONFIGURATION
// ============================================
form.configureSubmitButton({
label: 'Submit Feedback',
isVisible: () => experienceSection.starRating('overall')?.value() !== null
});
form.configureCompletionScreen({
type: 'text',
title: 'Thank you for your feedback!',
message: 'Your insights help us create better networking opportunities at future events. Happy connecting!'
});
}