export function weddingFeedbackSurvey(form: FormTs) {
// Wedding Guest Feedback Form - Celebration Review
// Demonstrates: StarRating, EmojiRating, MatrixQuestion, Slider, SuggestionChips, ThumbRating, fun styling
// ============================================
// HEADER
// ============================================
form.addRow(row => {
row.addTextPanel('header', {
label: 'Thank You for Celebrating With Us!',
computedValue: () => "We'd love to hear about your experience at our special day. Your feedback means the world to us!",
customStyles: {
background: 'linear-gradient(135deg, #f472b6 0%, #c084fc 50%, #818cf8 100%)',
color: 'white',
padding: '28px',
borderRadius: '16px',
textAlign: 'center'
}
});
});
// ============================================
// SECTION 1: Overall Experience
// ============================================
const overallSection = form.addSubform('overallSection', {
title: 'The Big Picture',
customStyles: () => {
const rating = overallSection.starRating('overallRating')?.value();
if (rating && rating >= 4) return { backgroundColor: '#fdf2f8', padding: '16px', borderRadius: '12px' };
return { padding: '16px', borderRadius: '12px', border: '1px dashed #f9a8d4' };
}
});
overallSection.addRow(row => {
row.addStarRating('overallRating', {
label: 'Overall, how was the wedding celebration?',
maxStars: 5,
size: 'xl',
alignment: 'center',
filledColor: '#ec4899',
showConfettiOnMax: true
});
});
overallSection.addRow(row => {
row.addEmojiRating('celebrationMood', {
label: 'How did you feel during the celebration?',
preset: 'mood',
size: 'lg',
alignment: 'center',
isVisible: () => overallSection.starRating('overallRating')?.value() !== null
});
});
// Fun factor slider
overallSection.addRow(row => {
row.addSlider('funFactor', {
label: 'How much fun did you have?',
min: 1,
max: 10,
step: 1,
showValue: true,
unit: '/10',
defaultValue: 7,
isVisible: () => overallSection.starRating('overallRating')?.value() !== null
});
});
overallSection.addRow(row => {
row.addTextPanel('funComment', {
computedValue: () => {
const fun = overallSection.slider('funFactor')?.value();
if (fun && fun >= 9) return '🎉 Party animal alert!';
if (fun && fun >= 7) return '💃 Sounds like you had a blast!';
if (fun && fun >= 5) return '🙂 We hope you enjoyed yourself!';
if (fun) return "🤔 We're sorry it wasn't more fun.";
return '';
},
customStyles: { fontStyle: 'italic', textAlign: 'center', padding: '8px', color: '#be185d' },
isVisible: () => overallSection.slider('funFactor')?.value() !== null
});
});
// ============================================
// SECTION 2: Event Aspects
// ============================================
const aspectsSection = form.addSubform('aspectsSection', {
title: 'Rate the Details',
isVisible: () => overallSection.starRating('overallRating')?.value() !== null
});
aspectsSection.addRow(row => {
row.addMatrixQuestion('eventRatings', {
label: 'How would you rate each aspect of the celebration?',
rows: [
{ id: 'venue', label: 'Venue & Atmosphere', isRequired: true },
{ id: 'ceremony', label: 'Ceremony', isRequired: true },
{ id: 'reception', label: 'Reception/Party', isRequired: false },
{ id: 'decorations', label: 'Decorations & Setup', isRequired: false },
{ id: 'organization', label: 'Overall Organization', isRequired: false }
],
columns: [
{ id: '1', label: '⭐' },
{ id: '2', label: '⭐⭐' },
{ id: '3', label: '⭐⭐⭐' },
{ id: '4', label: '⭐⭐⭐⭐' },
{ id: '5', label: '⭐⭐⭐⭐⭐' }
],
striped: true,
fullWidth: true
});
});
// ============================================
// SECTION 3: Food & Drinks
// ============================================
const foodSection = form.addSubform('foodSection', {
title: 'Food & Beverages',
isVisible: () => overallSection.starRating('overallRating')?.value() !== null
});
foodSection.addRow(row => {
row.addStarRating('foodRating', {
label: 'How was the food?',
maxStars: 5,
size: 'lg',
alignment: 'center',
filledColor: '#f59e0b'
});
});
foodSection.addRow(row => {
row.addStarRating('drinksRating', {
label: 'How were the drinks?',
maxStars: 5,
size: 'lg',
alignment: 'center',
filledColor: '#8b5cf6'
});
});
foodSection.addRow(row => {
row.addThumbRating('cakeThumb', {
label: 'Did you try the wedding cake?',
size: 'md',
showLabels: true,
upLabel: 'Yes, delicious!',
downLabel: "Didn't try it",
alignment: 'center'
});
});
// ============================================
// SECTION 4: Entertainment
// ============================================
const entertainmentSection = form.addSubform('entertainmentSection', {
title: 'Entertainment & Music',
isVisible: () => overallSection.starRating('overallRating')?.value() !== null
});
entertainmentSection.addRow(row => {
row.addSlider('musicRating', {
label: 'How was the music/DJ/band?',
min: 1,
max: 10,
step: 1,
showValue: true,
defaultValue: 7
});
});
entertainmentSection.addRow(row => {
row.addThumbRating('dancedQuestion', {
label: 'Did you hit the dance floor?',
size: 'md',
showLabels: true,
upLabel: 'Yes, danced the night away!',
downLabel: "Preferred to watch",
alignment: 'center'
});
});
// ============================================
// SECTION 5: Memorable Moments
// ============================================
const momentsSection = form.addSubform('momentsSection', {
title: 'Favorite Moments',
isVisible: () => overallSection.starRating('overallRating')?.value() !== null,
customStyles: { backgroundColor: '#fdf4ff', padding: '16px', borderRadius: '12px' }
});
momentsSection.addRow(row => {
row.addSuggestionChips('bestMoments', {
label: 'What were your favorite parts? (select all that apply)',
suggestions: [
{ id: 'vows', name: 'The vows' },
{ id: 'first-dance', name: 'First dance' },
{ id: 'speeches', name: 'Speeches/toasts' },
{ id: 'cake-cutting', name: 'Cake cutting' },
{ id: 'bouquet-toss', name: 'Bouquet toss' },
{ id: 'dancing', name: 'Dancing' },
{ id: 'photo-booth', name: 'Photo booth' },
{ id: 'cocktail-hour', name: 'Cocktail hour' },
{ id: 'sunset', name: 'Sunset/venue views' },
{ id: 'exit', name: 'Grand exit' }
],
alignment: 'center'
});
});
momentsSection.addSpacer();
momentsSection.addRow(row => {
row.addTextarea('specialMoment', {
label: 'Tell us about your favorite moment:',
placeholder: 'What made it special for you?',
rows: 3
});
});
// ============================================
// SECTION 6: Message to the Couple
// ============================================
const messageSection = form.addSubform('messageSection', {
title: 'Message for the Newlyweds',
isVisible: () => overallSection.starRating('overallRating')?.value() !== null,
customStyles: { backgroundColor: '#fef3c7', padding: '16px', borderRadius: '12px' }
});
messageSection.addRow(row => {
row.addTextarea('coupleMessage', {
label: 'Leave a message for the happy couple:',
placeholder: 'Congratulations, advice, wishes, or just let them know how much fun you had!',
rows: 4
});
});
messageSection.addSpacer();
messageSection.addRow(row => {
row.addRadioButton('sharePermission', {
label: 'Can we share your feedback with our vendors?',
options: [
{ id: 'yes', name: 'Yes, share away!' },
{ id: 'anonymous', name: 'Yes, but anonymously' },
{ id: 'no', name: "No, keep it private" }
],
orientation: 'vertical'
});
});
// ============================================
// SECTION 7: Summary
// ============================================
const summarySection = form.addSubform('summary', {
title: 'Your Celebration Summary',
isVisible: () => overallSection.starRating('overallRating')?.value() !== null
});
summarySection.addRow(row => {
row.addTextPanel('summaryContent', {
computedValue: () => {
const overall = overallSection.starRating('overallRating')?.value();
const mood = overallSection.emojiRating('celebrationMood')?.value();
const fun = overallSection.slider('funFactor')?.value();
const food = foodSection.starRating('foodRating')?.value();
const drinks = foodSection.starRating('drinksRating')?.value();
const music = entertainmentSection.slider('musicRating')?.value();
const danced = entertainmentSection.thumbRating('dancedQuestion')?.value();
const moments = momentsSection.suggestionChips('bestMoments')?.value() || [];
if (!overall) return '';
let summary = '💒 Wedding Celebration Summary\n';
summary += '━'.repeat(30) + '\n\n';
// Overall
summary += `💕 Overall: ${'❤️'.repeat(overall)} ${overall}/5\n`;
// Mood
if (mood) {
const moodLabels: Record<string, string> = {
'sad': '😢',
'down': '😔',
'neutral': '😐',
'happy': '😊',
'excited': '🤩'
};
summary += `Mood: ${moodLabels[mood] || mood}\n`;
}
// Fun factor
if (fun) {
summary += `🎉 Fun Factor: ${fun}/10\n`;
}
summary += '\n';
// Food & Drinks
if (food) summary += `🍽️ Food: ${'⭐'.repeat(food)}\n`;
if (drinks) summary += `🥂 Drinks: ${'⭐'.repeat(drinks)}\n`;
// Music & Dancing
if (music) summary += `🎵 Music: ${music}/10\n`;
if (danced === 'up') summary += '💃 Hit the dance floor!\n';
// Favorite moments
if (moments.length > 0) {
summary += `\n✨ Favorite moments: ${moments.length} selected`;
}
summary += '\n\n💝 Thank you for celebrating with us!';
return summary;
},
customStyles: () => {
const baseStyles = {
padding: '20px',
borderRadius: '12px',
whiteSpace: 'pre-wrap',
fontFamily: 'monospace',
fontSize: '14px',
background: 'linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%)',
borderLeft: '4px solid #ec4899'
};
return baseStyles;
}
});
});
// ============================================
// FORM CONFIGURATION
// ============================================
form.configureSubmitButton({
label: 'Send Celebration Feedback 🎉',
isVisible: () => overallSection.starRating('overallRating')?.value() !== null
});
form.configureCompletionScreen({
type: 'text',
title: 'Thank You So Much! 💕',
message: "Your feedback means the world to us! We're so grateful you were part of our special day. The memories we've made together will last a lifetime. Here's to love, laughter, and happily ever after!"
});
}