Skip to content

Commit b826232

Browse files
Remove Cal.com booking capability from demo form (#1469)
- Remove company size check and Cal.com redirect logic - Show thank you modal for all form submissions regardless of company size - Preserve existing PostHog tracking for all submissions - Remove unused imports (urllib.parse, CAL_REQUEST_DEMO_URL) - Remove unused is_small_company() method Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]>
1 parent a42d9c5 commit b826232

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

pcweb/pages/pricing/header.py

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import re
2-
import urllib.parse
32
from typing import Any, Literal
43

54
import reflex as rx
@@ -8,7 +7,6 @@
87

98
from pcweb.components.hosting_banner import HostingBannerState
109
from pcweb.components.new_button import button
11-
from pcweb.constants import CAL_REQUEST_DEMO_URL
1210
from pcweb.pages.framework.views.companies import pricing_page_companies
1311
from pcweb.telemetry.postog_metrics import DemoEvent, send_data_to_posthog
1412

@@ -123,10 +121,6 @@ def set_select_value(self, field: str, value: str):
123121
"""Update the selected value for a given field."""
124122
setattr(self, field, value)
125123

126-
def is_small_company(self) -> bool:
127-
"""Check if company has 10 or fewer employees."""
128-
return self.num_employees in ["1", "2-5", "6-10"]
129-
130124
@rx.event
131125
def submit(self, form_data: dict[str, Any]):
132126
# LinkedIn URL validation
@@ -190,22 +184,9 @@ def submit(self, form_data: dict[str, Any]):
190184
# Send to PostHog for all submissions
191185
yield QuoteFormState.send_demo_event(form_data)
192186

193-
# Check if it's a small company
194-
if self.is_small_company():
195-
yield ThankYouDialogState.push(True)
196-
return
197-
198-
# For larger companies, redirect to calendar booking
199-
params = {
200-
"email": form_data.get("email", ""),
201-
"name": f"{form_data.get('first_name', '')} {form_data.get('last_name', '')}",
202-
"notes": notes_content,
203-
}
204-
205-
query_string = urllib.parse.urlencode(params)
206-
cal_url = f"{CAL_REQUEST_DEMO_URL}?{query_string}"
207-
208-
return rx.redirect(cal_url)
187+
# Show thank you modal for all submissions
188+
yield ThankYouDialogState.push(True)
189+
return
209190

210191

211192
@rx.event(background=True)

0 commit comments

Comments
 (0)