I'll update the campaign wizard to collect the additional user information and redirect to the thank you page after submission. Let's make these changes:
I've updated the campaign wizard to include the additional information you requested and to redirect to the thank you page after submission. Here are the key changes:
Collects:
After submitting the form, users are now redirected to:
https://mailprosusa.com/thank-you/The wizard now follows this 5-step process:
This approach collects all the necessary information while maintaining a clean, step-by-step experience that works well on both desktop and mobile devices.
Contact Form 7 doesn't natively support multi-step forms, but I can show you how to create this experience using CF7 with some custom JavaScript and CSS. Here's a complete implementation plan:
The easiest approach is to use a dedicated plugin:
Install and activate the "Contact Form 7 Multi-Step Forms" plugin
[step "1" "Your Information"]
... fields for step 1 ...
[step "2" "Campaign Type"]
... fields for step 2 ...If you prefer a custom solution without additional plugins:
<div class="campaign-wizard" id="campaign-wizard">
<!-- Progress Bar -->
<div class="progress-container">
<div class="progress-bar">
<div class="progress-fill" id="progress-fill"></div>
</div>
<div class="step-indicators">
<span class="step-indicator active" data-step="1">Your Info</span>
<span class="step-indicator" data-step="2">Campaign Type</span>
<span class="step-indicator" data-step="3">Audience</span>
<span class="step-indicator" data-step="4">Design</span>
<span class="step-indicator" data-step="5">Review</span>
</div>
</div>
<!-- Step 1: User Information -->
<div class="form-step" id="step-1">
<h3>Your Information</h3>
<p class="step-description">We'll use this information to prepare your personalized quote.</p>
<div class="form-row two-col">
<div class="form-col">
<label>First Name <span class="required">*</span></label>
[text* first-name placeholder "John"]
</div>
<div class="form-col">
<label>Last Name <span class="required">*</span></label>
[text* last-name placeholder "Smith"]
</div>
</div>
<div class="form-row">
<label>Email Address <span class="required">*</span></label>
[email* email placeholder "you@yourbusiness.com"]
</div>
<div class="form-row">
<label>Phone Number <span class="required">*</span></label>
[tel* phone placeholder "(949) 380-9500"]
</div>
<div class="form-row">
<label>Business / Organization Name</label>
[text business-name placeholder "Acme Inc."]
</div>
<div class="form-row">
<label>Industry</label>
[select industry "Retail" "Healthcare" "Real Estate" "Financial Services" "Education" "Hospitality" "Technology" "Manufacturing" "Non-Profit" "Other"]
</div>
</div>
<!-- Step 2: Campaign Type -->
<div class="form-step hidden" id="step-2">
<h3>Campaign Type</h3>
<p class="step-description">What type of campaign are you planning?</p>
<div class="form-row">
<label>Campaign Type <span class="required">*</span></label>
[radio campaign-type use_label_element "Direct Mail Marketing" "Every Door Direct Mail (EDDM)" "Political Campaign" "Fulfillment Package"]
</div>
<div class="form-row">
<label>Product Type <span class="required">*</span></label>
[select product-type "Postcard (standard)" "Postcard (oversized)" "Letter / Envelope" "Self-Mailer (folded)" "Brochure / Catalog" "Fulfillment Package" "Other"]
</div>
</div>
<!-- Step 3: Audience -->
<div class="form-step hidden" id="step-3">
<h3>Target Audience</h3>
<p class="step-description">Who is your target audience?</p>
<div class="form-row">
<label>Mailing List Type <span class="required">*</span></label>
[radio audience-type use_label_element "Business List" "Homeowner List" "Resident/Occupant List" "I Have My Own List"]
</div>
<div class="form-row" id="mailing-list-upload">
<label>Upload Your Mailing List</label>
<small>CSV, XLS, or XLSX formats accepted</small>
[file mailing-list filetypes:csv|xls|xlsx limit:10mb]
</div>
<div class="form-row">
<label>Target Locations <span class="required">*</span></label>
[checkbox locations use_label_element "Fullerton" "Orange" "Garden Grove" "Anaheim" "Santa Ana" "Huntington Beach" "Newport Beach" "Laguna Beach" "Laguna Hills" "Irvine"]
</div>
<div class="form-row">
<label>Approximate Quantity</label>
[number quantity min:100 max:10000 step:100 default:1000]
</div>
</div>
<!-- Step 4: Design -->
<div class="form-step hidden" id="step-4">
<h3>Design Options</h3>
<p class="step-description">Tell us about your design needs</p>
<div class="form-row">
<label>Design Service <span class="required">*</span></label>
[radio design-service use_label_element "Yes, I need design help" "No, I have my own design"]
</div>
<div class="form-row" id="design-style-container">
<label>Design Style Preference</label>
[radio design-style use_label_element "Modern & Clean" "Bold & Attention-Grabbing" "Elegant & Professional" "Playful & Colorful"]
</div>
<div class="form-row" id="design-files-container">
<label>Upload Your Design Files</label>
<small>JPG, PNG, PDF, AI, or PSD formats accepted</small>
[file design-files filetypes:jpg|jpeg|png|pdf|ai|psd limit:10mb multiple]
</div>
<div class="form-row">
<label>Additional Design Instructions</label>
[textarea additional-info placeholder "Please share any specific design preferences, branding guidelines, or other requirements..."]
</div>
</div>
<!-- Step 5: Review -->
<div class="form-step hidden" id="step-5">
<h3>Review Your Campaign</h3>
<p class="step-description">Please review your campaign details before submitting.</p>
<div class="summary-container" id="summary-container">
<!-- This will be populated by JavaScript -->
</div>
<div class="confirmation-message">
<p>By clicking "Submit Request", our team will review your request and get back to you within 1 business day with a custom quote.</p>
</div>
</div>
<!-- Navigation Buttons -->
<div class="form-navigation">
<button type="button" class="back-button" id="back-button">Back</button>
<button type="button" class="next-button" id="next-button">Continue</button>
<button type="submit" class="submit-button hidden" id="submit-button">Submit Request</button>
</div>
</div>Add this CSS to your theme's style.css or in the WordPress Customizer:
/* Multi-step Form Styling */
.campaign-wizard {
max-width: 800px;
margin: 0 auto;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
/* Progress Bar */
.progress-container {
margin-bottom: 30px;
}
.progress-bar {
height: 8px;
background-color: #f3f4f6;
border-radius: 4px;
margin-bottom: 10px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background-color: #db2777;
transition: width 0.3s ease;
width: 20%; /* Will be updated by JS */
}
.step-indicators {
display: flex;
justify-content: space-between;
}
.step-indicator {
font-size: 12px;
color: #9ca3af;
font-weight: 500;
}
.step-indicator.active {
color: #db2777;
}
/* Form Steps */
.form-step {
background-color: #fff;
border-radius: 8px;
padding: 24px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
}
.form-step h3 {
font-size: 20px;
margin-top: 0;
margin-bottom: 10px;
color: #111827;
}
.step-description {
color: #6b7280;
margin-bottom: 20px;
}
.hidden {
display: none;
}
/* Form Layout */
.form-row {
margin-bottom: 20px;
}
.two-col {
display: flex;
gap: 20px;
}
.form-col {
flex: 1;
}
label {
display: block;
margin-bottom: 5px;
font-weight: 500;
}
.required {
color: #ef4444;
}
small {
display: block;
color: #6b7280;
margin-bottom: 5px;
}
/* Form Controls */
.wpcf7-form-control {
width: 100%;
padding: 10px;
border: 1px solid #d1d5db;
border-radius: 4px;
font-size: 16px;
}
.wpcf7-textarea {
min-height: 120px;
}
.wpcf7-list-item {
display: block;
margin-bottom: 8px;
}
/* Radio and Checkbox Styling */
.wpcf7-radio .wpcf7-list-item,
.wpcf7-checkbox .wpcf7-list-item {
display: flex;
align-items: center;
margin-left: 0;
margin-bottom: 10px;
padding: 10px;
border: 1px solid #e5e7eb;
border-radius: 4px;
transition: all 0.2s;
}
.wpcf7-radio .wpcf7-list-item:hover,
.wpcf7-checkbox .wpcf7-list-item:hover {
border-color: #db2777;
background-color: #fdf2f8;
}
.wpcf7-radio .wpcf7-list-item-label,
.wpcf7-checkbox .wpcf7-list-item-label {
margin-left: 8px;
}
/* Navigation Buttons */
.form-navigation {
display: flex;
justify-content: space-between;
margin-top: 20px;
}
.back-button,
.next-button,
.submit-button {
padding: 10px 20px;
border-radius: 4px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
}
.back-button {
background-color: #f3f4f6;
border: 1px solid #d1d5db;
color: #374151;
}
.back-button:hover {
background-color: #e5e7eb;
}
.next-button,
.submit-button {
background-color: #db2777;
border: 1px solid #db2777;
color: white;
}
.next-button:hover,
.submit-button:hover {
background-color: #be185d;
}
/* Summary Section */
.summary-container {
background-color: #f9fafb;
border-radius: 4px;
padding: 20px;
}
.summary-section {
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 1px solid #e5e7eb;
}
.summary-section:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: 0;
}
.summary-section h4 {
font-size: 16px;
margin-top: 0;
margin-bottom: 10px;
color: #111827;
}
.summary-item {
display: flex;
margin-bottom: 5px;
}
.summary-label {
font-weight: 500;
width: 40%;
}
.summary-value {
width: 60%;
}
.confirmation-message {
margin-top: 20px;
padding: 15px;
background-color: #ecfdf5;
border: 1px solid #a7f3d0;
border-radius: 4px;
color: #065f46;
}
/* Responsive Adjustments */
@media (max-width: 768px) {
.two-col {
flex-direction: column;
gap: 10px;
}
.step-indicators {
display: none;
}
}Add this JavaScript to your theme or use a custom JavaScript plugin:
document.addEventListener('DOMContentLoaded', function() {
// Only run if our form exists on the page
if (!document.getElementById('campaign-wizard')) return;
// Form elements
const form = document.querySelector('.wpcf7-form');
const steps = document.querySelectorAll('.form-step');
const progressFill = document.getElementById('progress-fill');
const stepIndicators = document.querySelectorAll('.step-indicator');
const nextButton = document.getElementById('next-button');
const backButton = document.getElementById('back-button');
const submitButton = document.getElementById('submit-button');
// Conditional elements
const mailingListUpload = document.getElementById('mailing-list-upload');
const designStyleContainer = document.getElementById('design-style-container');
const designFilesContainer = document.getElementById('design-files-container');
// Summary container
const summaryContainer = document.getElementById('summary-container');
let currentStep = 1;
const totalSteps = steps.length;
// Initialize the form
function initForm() {
updateProgressBar();
setupConditionalLogic();
// Hide mailing list upload initially
mailingListUpload.style.display = 'none';
// Event listeners
nextButton.addEventListener('click', goToNextStep);
backButton.addEventListener('click', goToPreviousStep);
// Disable form submission until the last step
form.addEventListener('submit', function(e) {
if (currentStep !== totalSteps) {
e.preventDefault();
return false;
}
});
}
// Update progress bar and indicators
function updateProgressBar() {
const progress = (currentStep / totalSteps) * 100;
progressFill.style.width = `${progress}%`;
// Update step indicators
stepIndicators.forEach((indicator, index) => {
if (index + 1 <= currentStep) {
indicator.classList.add('active');
} else {
indicator.classList.remove('active');
}
});
// Show/hide navigation buttons
if (currentStep === 1) {
backButton.style.visibility = 'hidden';
} else {
backButton.style.visibility = 'visible';
}
if (currentStep === totalSteps) {
nextButton.style.display = 'none';
submitButton.classList.remove('hidden');
generateSummary();
} else {
nextButton.style.display = 'block';
submitButton.classList.add('hidden');
}
}
// Go to next step
function goToNextStep() {
if (validateCurrentStep()) {
if (currentStep < totalSteps) {
steps[currentStep - 1].classList.add('hidden');
currentStep++;
steps[currentStep - 1].classList.remove('hidden');
updateProgressBar();
window.scrollTo(0, 0);
}
}
}
// Go to previous step
function goToPreviousStep() {
if (currentStep > 1) {
steps[currentStep - 1].classList.add('hidden');
currentStep--;
steps[currentStep - 1].classList.remove('hidden');
updateProgressBar();
window.scrollTo(0, 0);
}
}
// Validate current step
function validateCurrentStep() {
let isValid = true;
const currentStepEl = steps[currentStep - 1];
// Check required fields in current step
const requiredFields = currentStepEl.querySelectorAll('[aria-required="true"]');
requiredFields.forEach(field => {
if (!field.value) {
isValid = false;
field.classList.add('wpcf7-not-valid');
// Add error message if it doesn't exist
let parent = field.closest('.wpcf7-form-control-wrap');
if (parent && !parent.querySelector('.wpcf7-not-valid-tip')) {
const errorMsg = document.createElement('span');
errorMsg.className = 'wpcf7-not-valid-tip';
errorMsg.textContent = 'This field is required.';
parent.appendChild(errorMsg);
}
} else {
field.classList.remove('wpcf7-not-valid');
// Remove error message if it exists
let parent = field.closest('.wpcf7-form-control-wrap');
if (parent) {
const errorMsg = parent.querySelector('.wpcf7-not-valid-tip');
if (errorMsg) errorMsg.remove();
}
}
});
// Step-specific validation
if (currentStep === 3) {
// Check if at least one location is selected
const locationCheckboxes = currentStepEl.querySelectorAll('input[name="locations[]"]:checked');
if (locationCheckboxes.length === 0) {
isValid = false;
alert('Please select at least one location.');
}
}
return isValid;
}
// Setup conditional logic
function setupConditionalLogic() {
// Show/hide mailing list upload based on audience type
const audienceTypeRadios = document.querySelectorAll('input[name="audience-type"]');
audienceTypeRadios.forEach(radio => {
radio.addEventListener('change', function() {
if (this.value === 'I Have My Own List') {
mailingListUpload.style.display = 'block';
} else {
mailingListUpload.style.display = 'none';
}
});
});
// Show/hide design options based on design service selection
const designServiceRadios = document.querySelectorAll('input[name="design-service"]');
designServiceRadios.forEach(radio => {
radio.addEventListener('change', function() {
if (this.value === 'Yes, I need design help') {
designStyleContainer.style.display = 'block';
designFilesContainer.style.display = 'none';
} else {
designStyleContainer.style.display = 'none';
designFilesContainer.style.display = 'block';
}
});
});
// Initialize design options display
designStyleContainer.style.display = 'none';
designFilesContainer.style.display = 'none';
}
// Generate summary for review step
function generateSummary() {
// Clear previous summary
summaryContainer.innerHTML = '';
// Contact Information
const contactSection = document.createElement('div');
contactSection.className = 'summary-section';
contactSection.innerHTML = `
<h4>Contact Information</h4>
<div class="summary-item">
<div class="summary-label">Name:</div>
<div class="summary-value">${getFieldValue('first-name')} ${getFieldValue('last-name')}</div>
</div>
<div class="summary-item">
<div class="summary-label">Email:</div>
<div class="summary-value">${getFieldValue('email')}</div>
</div>
<div class="summary-item">
<div class="summary-label">Phone:</div>
<div class="summary-value">${getFieldValue('phone')}</div>
</div>
${getFieldValue('business-name') ? `
<div class="summary-item">
<div class="summary-label">Business:</div>
<div class="summary-value">${getFieldValue('business-name')}</div>
</div>
` : ''}
${getFieldValue('industry') ? `
<div class="summary-item">
<div class="summary-label">Industry:</div>
<div class="summary-value">${getFieldValue('industry')}</div>
</div>
` : ''}
`;
summaryContainer.appendChild(contactSection);
// Campaign Details
const campaignSection = document.createElement('div');
campaignSection.className = 'summary-section';
campaignSection.innerHTML = `
<h4>Campaign Details</h4>
<div class="summary-item">
<div class="summary-label">Campaign Type:</div>
<div class="summary-value">${getRadioValue('campaign-type')}</div>
</div>
<div class="summary-item">
<div class="summary-label">Product Type:</div>
<div class="summary-value">${getFieldValue('product-type')}</div>
</div>
`;
summaryContainer.appendChild(campaignSection);
// Audience
const audienceSection = document.createElement('div');
audienceSection.className = 'summary-section';
audienceSection.innerHTML = `
<h4>Audience</h4>
<div class="summary-item">
<div class="summary-label">List Type:</div>
<div class="summary-value">${getRadioValue('audience-type')}</div>
</div>
<div class="summary-item">
<div class="summary-label">Quantity:</div>
<div class="summary-value">${getFieldValue('quantity')}</div>
</div>
<div class="summary-item">
<div class="summary-label">Locations:</div>
<div class="summary-value">${getCheckboxValues('locations[]').join(', ')}</div>
</div>
`;
summaryContainer.appendChild(audienceSection);
// Design
const designSection = document.createElement('div');
designSection.className = 'summary-section';
designSection.innerHTML = `
<h4>Design</h4>
<div class="summary-item">
<div class="summary-label">Design Service:</div>
<div class="summary-value">${getRadioValue('design-service')}</div>
</div>
${getRadioValue('design-service') === 'Yes, I need design help' && getRadioValue('design-style') ? `
<div class="summary-item">
<div class="summary-label">Style Preference:</div>
<div class="summary-value">${getRadioValue('design-style')}</div>
</div>
` : ''}
${getFieldValue('additional-info') ? `
<div class="summary-item">
<div class="summary-label">Additional Info:</div>
<div class="summary-value">${getFieldValue('additional-info')}</div>
</div>
` : ''}
`;
summaryContainer.appendChild(designSection);
}
// Helper functions to get field values
function getFieldValue(fieldName) {
const field = document.querySelector(`[name="${fieldName}"]`);
return field ? field.value : '';
}
function getRadioValue(fieldName) {
const checkedRadio = document.querySelector(`[name="${fieldName}"]:checked`);
return checkedRadio ? checkedRadio.value : '';
}
function getCheckboxValues(fieldName) {
const checkedBoxes = document.querySelectorAll(`[name="${fieldName}"]:checked`);
return Array.from(checkedBoxes).map(box => box.value);
}
// Initialize the form
initForm();
});To: admin@example.com
From: [your-name] <wordpress@yourdomain.com>
Subject: New Campaign Request from [first-name] [last-name]
A new campaign request has been submitted:
Name: [first-name] [last-name]
Email: [email]
Phone: [phone]
Business: [business-name]
Industry: [industry]
Campaign Type: [campaign-type]
Product Type: [product-type]
Audience Type: [audience-type]
Locations: [locations]
Quantity: [quantity]
Design Service: [design-service]
Design Style: [design-style]
Additional Information:
[additional-info]To: [email]
From: Your Company <info@yourdomain.com>
Subject: Your Campaign Request Has Been Received
Dear [first-name],
Thank you for requesting a quote. We're already working on preparing your personalized pricing.
What Happens Next?
1. Quote Preparation
Our team is reviewing your requirements and preparing a detailed quote for your direct mail campaign.
2. Quote Delivery
You'll receive your personalized quote within 24 hours (during business days).
3. Check Your Email
We've sent a confirmation to your email with a summary of your quote request.
If you have any questions, please call or text us at (949) 380-9500.
Best regards,
Your Company Teamadd_action('wp_footer', 'redirect_cf7_to_thank_you');
function redirect_cf7_to_thank_you() {
?>
<script type="text/javascript">
document.addEventListener('wpcf7mailsent', function(event) {
if (event.detail.contactFormId == '123') { // Replace 123 with your form ID
window.location.href = 'https://mailprosusa.com/thank-you/';
}
}, false);
</script>
<?php
}If this implementation seems complex, consider these premium alternatives that offer built-in multi-step functionality:
These options require a paid license but provide a more robust solution with less custom code.