Skip to content

Commit eea6fb0

Browse files
authored
update request demo form (#1439)
* update request demo form * move url to constants
1 parent 718f3e4 commit eea6fb0

File tree

2 files changed

+24
-25
lines changed

2 files changed

+24
-25
lines changed

pcweb/constants.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
SPLINE_URL = "https://github.com/splinetool/react-spline"
4444
ENTERPRISE_DOCS_URL = "https://enterprise.reflex.dev"
4545
DATABRICKS_NOTION_URL = "https://reflex-dev.notion.site/reflex-x-databricks"
46+
CAL_REQUEST_DEMO_URL = (
47+
"https://cal.com/team/reflex/reflex-team-enterprise-follow-up-call"
48+
)
4649

4750
# Install urls.
4851
BUN_URL = "https://bun.sh"

pcweb/pages/pricing/header.py

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
import urllib.parse
2+
from typing import Any, Literal
3+
14
import reflex as rx
5+
from reflex.event import EventType
6+
7+
from pcweb.constants import CAL_REQUEST_DEMO_URL
28
from pcweb.components.hosting_banner import HostingBannerState
3-
from pcweb.pages.framework.views.companies import pricing_page_companies
49
from pcweb.components.new_button import button
5-
from typing import Literal, Any
6-
7-
import urllib.parse
8-
from datetime import datetime
9-
from reflex.event import EventType
10+
from pcweb.pages.framework.views.companies import pricing_page_companies
1011
from pcweb.telemetry.postog_metrics import DemoEvent, send_data_to_posthog
1112

1213
SelectVariant = Literal["primary", "secondary", "outline", "transparent"]
@@ -154,30 +155,25 @@ def submit(self, form_data: dict[str, Any]):
154155
return
155156

156157
self.banned_email = False
157-
now = datetime.now()
158-
current_month = now.strftime("%Y-%m")
159-
current_date = now.strftime("%Y-%m-%d")
158+
159+
notes_content = f"""
160+
Name: {form_data.get("first_name", "")} {form_data.get("last_name", "")}
161+
Business Email: {form_data.get("email", "")}
162+
Phone Number: {form_data.get("phone_number", "")}
163+
Job Title: {form_data.get("job_title", "")}
164+
Company Name: {form_data.get("company_name", "")}
165+
Number of Employees: {self.num_employees}
166+
Internal Tools to Build: {form_data.get("internal_tools", "")}
167+
How they heard about Reflex: {self.referral_source}"""
160168

161169
params = {
162-
"First Name": form_data.get("first_name", ""),
163-
"Last Name": form_data.get("last_name", ""),
164-
"Business Email Address": form_data.get("email", ""),
165-
"Job Title": form_data.get("job_title", ""),
166-
"Company name": form_data.get("company_name", ""),
167-
"Phone Number": form_data.get("phone_number", ""),
168-
"Number of Employees": self.num_employees,
169-
"What internal tools are you looking to build?": form_data.get(
170-
"internal_tools", ""
171-
),
172-
"Where did you first hear about Reflex?": self.referral_source,
173-
"month": current_month,
174-
"date": current_date,
170+
"email": form_data.get("email", ""),
171+
"name": f"{form_data.get('first_name', '')} {form_data.get('last_name', '')}",
172+
"notes": notes_content,
175173
}
176174

177175
query_string = urllib.parse.urlencode(params)
178-
cal_url = (
179-
f"https://cal.com/team/reflex/talk-to-a-reflex-expert?{query_string}"
180-
)
176+
cal_url = f"{CAL_REQUEST_DEMO_URL}?{query_string}"
181177

182178
yield QuoteFormState.send_demo_event(form_data)
183179

0 commit comments

Comments
 (0)