export function exhibitionFeedbackSurvey(form: FormTs) {
// Exhibition & Trade Show Feedback Survey
// Comprehensive evaluation of trade shows, expos, and industry exhibitions
// Demonstrates: StarRating, RatingScale (NPS), EmojiRating, ThumbRating, MatrixQuestion, CheckboxList, Slider, Integer, Dropdown, SuggestionChips, dynamic styling
// ============================================
// HEADER
// ============================================
form.addRow(row => {
row.addTextPanel('header', {
label: 'Exhibition Feedback',
computedValue: () => 'Help us improve future events by sharing your experience.',
customStyles: {
backgroundColor: '#7c2d12',
color: 'white',
padding: '24px',
borderRadius: '12px',
textAlign: 'center'
}
});
});
// ============================================
// SECTION 1: Attendance Details
// ============================================
const attendanceSection = form.addSubform('attendanceSection', {
title: 'Your Attendance'
});
attendanceSection.addRow(row => {
row.addDropdown('attendeeType', {
label: 'I attended as a...',
options: [
{ id: 'buyer', name: 'Buyer / Procurement Professional' },
{ id: 'exhibitor', name: 'Exhibitor / Vendor' },
{ id: 'visitor', name: 'General Visitor' },
{ id: 'press', name: 'Press / Media' },
{ id: 'speaker', name: 'Speaker / Presenter' },
{ id: 'sponsor', name: 'Sponsor' }
],
placeholder: 'Select your role...',
isRequired: true
}, '1fr');
row.addDropdown('daysAttended', {
label: 'Days attended',
options: [
{ id: '1', name: '1 day' },
{ id: '2', name: '2 days' },
{ id: '3', name: '3 days' },
{ id: '4+', name: '4+ days' }
],
placeholder: 'Select...'
}, '1fr');
});
attendanceSection.addRow(row => {
row.addDropdown('industry', {
label: 'Your industry',
options: [
{ id: 'manufacturing', name: 'Manufacturing' },
{ id: 'technology', name: 'Technology / IT' },
{ id: 'healthcare', name: 'Healthcare / Medical' },
{ id: 'retail', name: 'Retail / E-commerce' },
{ id: 'automotive', name: 'Automotive' },
{ id: 'construction', name: 'Construction / Real Estate' },
{ id: 'food-beverage', name: 'Food & Beverage' },
{ id: 'fashion', name: 'Fashion / Apparel' },
{ id: 'other', name: 'Other' }
],
placeholder: 'Select industry...'
});
});
// ============================================
// SECTION 2: Overall Experience
// ============================================
const overallSection = form.addSubform('overallSection', {
title: 'Overall Experience',
customStyles: () => {
const rating = overallSection.starRating('overallRating')?.value();
if (rating !== null && rating !== undefined) {
if (rating >= 4) return { backgroundColor: '#d1fae5', padding: '16px', borderRadius: '8px' };
if (rating >= 3) return { backgroundColor: '#fef3c7', padding: '16px', borderRadius: '8px' };
return { backgroundColor: '#fee2e2', padding: '16px', borderRadius: '8px' };
}
return { padding: '16px', borderRadius: '8px', border: '1px dashed #cbd5e1' };
}
});
overallSection.addRow(row => {
row.addStarRating('overallRating', {
label: 'How would you rate the exhibition overall?',
maxStars: 5,
size: 'xl',
alignment: 'center',
showConfettiOnMax: true
});
});
overallSection.addRow(row => {
row.addEmojiRating('eventMood', {
label: 'How did you feel about the event?',
preset: 'satisfaction',
size: 'lg',
showLabels: true,
alignment: 'center'
});
});
// ============================================
// SECTION 3: Exhibitors & Booths
// ============================================
const boothSection = form.addSubform('boothSection', {
title: 'Exhibitors & Booths',
isVisible: () => overallSection.starRating('overallRating')?.value() !== null
});
boothSection.addRow(row => {
row.addMatrixQuestion('boothRatings', {
label: 'Rate the following aspects:',
rows: [
{ id: 'variety', label: 'Variety of exhibitors', isRequired: true },
{ id: 'relevance', label: 'Relevance to my industry' },
{ id: 'booth-quality', label: 'Booth presentation quality' },
{ id: 'staff-knowledge', label: 'Booth staff knowledge' },
{ id: 'demos', label: 'Product demonstrations' },
{ id: 'materials', label: 'Marketing materials quality' }
],
columns: [
{ id: 'poor', label: 'Poor' },
{ id: 'fair', label: 'Fair' },
{ id: 'good', label: 'Good' },
{ id: 'excellent', label: 'Excellent' }
],
striped: true,
fullWidth: true
});
});
boothSection.addRow(row => {
row.addInteger('boothsVisited', {
label: 'Approximately how many booths did you visit?',
min: 0,
max: 500,
placeholder: 'Number of booths'
}, '1fr');
row.addInteger('leadsCollected', {
label: 'Valuable contacts/leads made',
min: 0,
max: 200,
placeholder: 'Number of contacts'
}, '1fr');
});
// ============================================
// SECTION 4: Value & ROI
// ============================================
const valueSection = form.addSubform('valueSection', {
title: 'Value & ROI',
isVisible: () => overallSection.starRating('overallRating')?.value() !== null
});
valueSection.addRow(row => {
row.addSlider('valueForTime', {
label: 'Value for time invested',
min: 1,
max: 10,
step: 1,
showValue: true,
unit: '/10'
}, '1fr');
row.addSlider('valueForMoney', {
label: 'Value for money (registration/travel)',
min: 1,
max: 10,
step: 1,
showValue: true,
unit: '/10'
}, '1fr');
});
valueSection.addRow(row => {
row.addThumbRating('foundWhatNeeded', {
label: 'Did you find products/services you were looking for?',
showLabels: true,
upLabel: 'Yes, I found them',
downLabel: 'No, not really',
size: 'lg',
alignment: 'center'
});
});
valueSection.addRow(row => {
row.addCheckboxList('valueAreas', {
label: 'What value did you get from attending?',
options: [
{ id: 'new-products', name: 'Discovered new products/services' },
{ id: 'networking', name: 'Made valuable business contacts' },
{ id: 'industry-trends', name: 'Learned about industry trends' },
{ id: 'competitor-info', name: 'Gathered competitor intelligence' },
{ id: 'purchase-info', name: 'Got info for purchasing decisions' },
{ id: 'education', name: 'Educational sessions/seminars' },
{ id: 'meetings', name: 'Scheduled follow-up meetings' }
],
orientation: 'vertical'
});
});
// ============================================
// SECTION 5: Venue & Logistics
// ============================================
const venueSection = form.addSubform('venueSection', {
title: 'Venue & Logistics',
isVisible: () => overallSection.starRating('overallRating')?.value() !== null
});
venueSection.addRow(row => {
row.addStarRating('venueRating', {
label: 'Venue quality',
maxStars: 5,
alignment: 'center'
}, '1fr');
row.addStarRating('layoutRating', {
label: 'Floor layout & navigation',
maxStars: 5,
alignment: 'center'
}, '1fr');
});
venueSection.addRow(row => {
row.addStarRating('amenitiesRating', {
label: 'Amenities (food, seating, wifi)',
maxStars: 5,
alignment: 'center'
}, '1fr');
row.addStarRating('registrationRating', {
label: 'Registration & check-in',
maxStars: 5,
alignment: 'center'
}, '1fr');
});
// ============================================
// SECTION 6: Networking & Sessions
// ============================================
const networkingSection = form.addSubform('networkingSection', {
title: 'Networking & Sessions',
isVisible: () => overallSection.starRating('overallRating')?.value() !== null
});
networkingSection.addRow(row => {
row.addStarRating('networkingQuality', {
label: 'Networking opportunities quality',
maxStars: 5,
size: 'lg',
alignment: 'center'
});
});
networkingSection.addRow(row => {
row.addThumbRating('attendedSessions', {
label: 'Did you attend any educational sessions/seminars?',
showLabels: true,
upLabel: 'Yes',
downLabel: 'No',
alignment: 'center'
});
});
networkingSection.addRow(row => {
row.addStarRating('sessionQuality', {
label: 'Rate the quality of sessions you attended',
maxStars: 5,
alignment: 'center',
isVisible: () => networkingSection.thumbRating('attendedSessions')?.value() === 'up'
});
});
// ============================================
// SECTION 7: Highlights & Improvements
// ============================================
const highlightsSection = form.addSubform('highlightsSection', {
title: 'Highlights',
isVisible: () => {
const rating = overallSection.starRating('overallRating')?.value();
return rating !== null && rating !== undefined && rating >= 3;
},
customStyles: { backgroundColor: '#ecfdf5', padding: '16px', borderRadius: '8px' }
});
highlightsSection.addRow(row => {
row.addSuggestionChips('bestParts', {
label: 'What were the highlights?',
suggestions: [
{ id: 'exhibitors', name: 'Quality exhibitors' },
{ id: 'new-tech', name: 'New technology showcased' },
{ id: 'networking', name: 'Networking events' },
{ id: 'speakers', name: 'Great speakers' },
{ id: 'venue', name: 'Excellent venue' },
{ id: 'organization', name: 'Well organized' },
{ id: 'demos', name: 'Live demonstrations' },
{ id: 'atmosphere', name: 'Great atmosphere' }
],
alignment: 'left'
});
});
const improvementSection = form.addSubform('improvementSection', {
title: 'Areas for Improvement',
isVisible: () => {
const rating = overallSection.starRating('overallRating')?.value();
return rating !== null && rating !== undefined && rating <= 3;
},
customStyles: { backgroundColor: '#fef2f2', padding: '16px', borderRadius: '8px' }
});
improvementSection.addRow(row => {
row.addSuggestionChips('issues', {
label: 'What needs improvement?',
suggestions: [
{ id: 'crowded', name: 'Too crowded' },
{ id: 'layout', name: 'Poor layout' },
{ id: 'exhibitors', name: 'Not enough exhibitors' },
{ id: 'relevance', name: 'Not relevant to me' },
{ id: 'parking', name: 'Parking/transport issues' },
{ id: 'food', name: 'Food/refreshments' },
{ id: 'wifi', name: 'Poor wifi' },
{ id: 'signage', name: 'Confusing signage' }
],
alignment: 'left'
});
});
// ============================================
// SECTION 8: Return Intent & NPS
// ============================================
const returnSection = form.addSubform('returnSection', {
title: 'Future Attendance',
isVisible: () => overallSection.starRating('overallRating')?.value() !== null,
customStyles: () => {
const category = returnSection.ratingScale('npsScore')?.npsCategory();
if (category === 'promoter') return { backgroundColor: '#d1fae5', padding: '16px', borderRadius: '8px' };
if (category === 'passive') return { backgroundColor: '#fef3c7', padding: '16px', borderRadius: '8px' };
if (category === 'detractor') return { backgroundColor: '#fee2e2', padding: '16px', borderRadius: '8px' };
return { padding: '16px', borderRadius: '8px', border: '1px dashed #cbd5e1' };
}
});
returnSection.addRow(row => {
row.addRatingScale('npsScore', {
preset: 'nps',
label: 'How likely are you to recommend this exhibition to a colleague?',
showCategoryLabel: true,
showSegmentColors: true,
showConfettiOnPromoter: true
});
});
returnSection.addRow(row => {
row.addThumbRating('willReturn', {
label: 'Will you attend next year\'s edition?',
showLabels: true,
upLabel: 'Yes, definitely',
downLabel: 'Probably not',
alignment: 'center',
isVisible: () => returnSection.ratingScale('npsScore')?.value() !== null
});
});
// ============================================
// SECTION 9: Final Comments
// ============================================
const finalSection = form.addSubform('finalSection', {
title: 'Additional Feedback',
isVisible: () => overallSection.starRating('overallRating')?.value() !== null
});
finalSection.addSpacer();
finalSection.addRow(row => {
row.addTextarea('bestExhibitor', {
label: 'Which exhibitor impressed you the most and why?',
placeholder: 'Name the standout booth...',
rows: 2
});
});
finalSection.addRow(row => {
row.addTextarea('suggestions', {
label: 'What would make this exhibition better?',
placeholder: 'Your suggestions for future events...',
rows: 3
});
});
// ============================================
// SECTION 10: Summary
// ============================================
const summarySection = form.addSubform('summary', {
title: 'Your Feedback Summary',
isVisible: () => overallSection.starRating('overallRating')?.value() !== null
});
summarySection.addRow(row => {
row.addTextPanel('summaryContent', {
computedValue: () => {
const overall = overallSection.starRating('overallRating')?.value();
const attendeeType = attendanceSection.dropdown('attendeeType')?.value();
const nps = returnSection.ratingScale('npsScore')?.value();
const npsCategory = returnSection.ratingScale('npsScore')?.npsCategory();
const valueTime = valueSection.slider('valueForTime')?.value();
const valueMoney = valueSection.slider('valueForMoney')?.value();
const boothsVisited = boothSection.integer('boothsVisited')?.value();
const leads = boothSection.integer('leadsCollected')?.value();
if (!overall) return '';
let emoji = overall >= 4 ? '🏆' : overall >= 3 ? '📊' : '⚠️';
const typeLabels: Record<string, string> = {
'buyer': 'Buyer',
'exhibitor': 'Exhibitor',
'visitor': 'Visitor',
'press': 'Press',
'speaker': 'Speaker',
'sponsor': 'Sponsor'
};
let summary = `${emoji} Exhibition Feedback\n`;
summary += `${'═'.repeat(30)}\n\n`;
if (attendeeType) {
summary += `👤 Attended as: ${typeLabels[attendeeType] || attendeeType}\n`;
}
summary += `⭐ Overall: ${overall}/5 stars\n`;
if (valueTime) {
summary += `⏱️ Time Value: ${valueTime}/10\n`;
}
if (valueMoney) {
summary += `💰 Money Value: ${valueMoney}/10\n`;
}
if (boothsVisited) {
summary += `\n📍 Booths Visited: ${boothsVisited}`;
}
if (leads) {
summary += `\n🤝 Contacts Made: ${leads}`;
}
if (nps !== null && nps !== undefined) {
summary += `\n\n📊 NPS: ${nps}/10 (${npsCategory?.charAt(0).toUpperCase()}${npsCategory?.slice(1)})`;
}
return summary;
},
customStyles: () => {
const rating = overallSection.starRating('overallRating')?.value();
const baseStyles = {
padding: '16px',
borderRadius: '8px',
whiteSpace: 'pre-wrap',
fontFamily: 'monospace',
fontSize: '14px'
};
if (rating !== null && rating !== undefined) {
if (rating >= 4) {
return { ...baseStyles, backgroundColor: '#d1fae5', borderLeft: '4px solid #10b981' };
} else if (rating >= 3) {
return { ...baseStyles, backgroundColor: '#fef3c7', borderLeft: '4px solid #f59e0b' };
} else {
return { ...baseStyles, backgroundColor: '#fee2e2', borderLeft: '4px solid #ef4444' };
}
}
return { ...baseStyles, backgroundColor: '#f1f5f9' };
}
});
});
// ============================================
// FORM CONFIGURATION
// ============================================
form.configureSubmitButton({
label: 'Submit Feedback',
isVisible: () => overallSection.starRating('overallRating')?.value() !== null
});
form.configureCompletionScreen({
type: 'text',
title: 'Thank you for your exhibition feedback!',
message: 'Your insights help us create better trade shows and exhibitions. We value your time and look forward to seeing you at future events.'
});
}