Skip to content

Commit a9be400

Browse files
Remove LinkedIn Profile URL and Phone number fields from demo form
- Remove linkedin_url and phone_number fields from DemoEvent dataclass - Remove LinkedIn Profile URL and Phone number input fields from form UI - Update form data mapping to exclude removed fields - Remove LinkedIn URL from notes content for enterprise follow-up - Remove linkedinUrl and phoneNumber from Slack payload - Update Cal.com URL for small companies to use reflex-intro-call - Add demo form test page at /demo-form route for testing The demo form now collects only essential information without optional LinkedIn and phone fields, streamlining the user experience while maintaining all core functionality for lead generation and routing. Co-Authored-By: Alek <[email protected]>
1 parent 6948846 commit a9be400

File tree

2 files changed

+14
-22
lines changed

2 files changed

+14
-22
lines changed

demo/demo/demo.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import reflex as rx
44

55
import reflex_ui as ui
6+
from reflex_ui.blocks.demo_form import demo_form
67

78

89
class State(rx.State):
@@ -65,6 +66,17 @@ def index() -> rx.Component:
6566
)
6667

6768

69+
def demo_form_page() -> rx.Component:
70+
return rx.el.div(
71+
rx.el.h1("Demo Form", class_name="text-2xl font-bold mb-6"),
72+
demo_form(class_name="max-w-md mx-auto"),
73+
ui.theme_switcher(class_name="absolute top-4 right-4"),
74+
class_name=ui.cn(
75+
"flex flex-col items-center justify-center min-h-screen p-6", "bg-secondary-1"
76+
),
77+
)
78+
79+
6880
app = rx.App(
6981
stylesheets=["css/globals.css"],
7082
head_components=[
@@ -88,3 +100,4 @@ def index() -> rx.Component:
88100
],
89101
)
90102
app.add_page(index)
103+
app.add_page(demo_form_page, route="/demo-form")

reflex_ui/blocks/demo_form.py

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
COMMONROOM_DESTINATION_ID = os.getenv("COMMONROOM_DESTINATION_ID", "")
2727
COMMONROOM_API_TOKEN = os.getenv("COMMONROOM_API_TOKEN", "")
2828
CAL_REQUEST_DEMO_URL = os.getenv(
29-
"CAL_REQUEST_DEMO_URL", "https://cal.com/team/reflex/reflex-intro"
29+
"CAL_REQUEST_DEMO_URL", "https://cal.com/team/reflex/reflex-intro-call"
3030
)
3131
CAL_ENTERPRISE_FOLLOW_UP_URL = os.getenv(
3232
"CAL_ENTERPRISE_FOLLOW_UP_URL",
@@ -58,13 +58,11 @@ class DemoEvent(PosthogEvent):
5858
first_name: str
5959
last_name: str
6060
company_email: str
61-
linkedin_url: str
6261
job_title: str
6362
company_name: str
6463
num_employees: str
6564
internal_tools: str
6665
referral_source: str
67-
phone_number: str = ""
6866

6967

7068
def input_field(
@@ -281,7 +279,6 @@ async def on_submit(self, form_data: dict[str, Any]):
281279
notes_content = f"""
282280
Name: {form_data.get("first_name", "")} {form_data.get("last_name", "")}
283281
Business Email: {form_data.get("email", "")}
284-
LinkedIn URL: {form_data.get("linkedin_profile_url", "")}
285282
Job Title: {form_data.get("job_title", "")}
286283
Company Name: {form_data.get("company_name", "")}
287284
Number of Employees: {form_data.get("number_of_employees", "")}
@@ -316,13 +313,11 @@ async def send_demo_event(self, form_data: dict[str, Any]):
316313
first_name=first_name,
317314
last_name=last_name,
318315
company_email=form_data.get("email", ""),
319-
linkedin_url=form_data.get("linkedin_profile_url", ""),
320316
job_title=form_data.get("job_title", ""),
321317
company_name=form_data.get("company_name", ""),
322318
num_employees=form_data.get("number_of_employees", ""),
323319
internal_tools=form_data.get("internal_tools", ""),
324320
referral_source=form_data.get("how_did_you_hear_about_us", ""),
325-
phone_number=form_data.get("phone_number", ""),
326321
)
327322

328323
# Send data to PostHog, Common Room, and Slack
@@ -400,13 +395,11 @@ async def send_data_to_slack(self, event_instance: DemoEvent):
400395
"lookingToBuild": event_instance.internal_tools,
401396
"businessEmail": event_instance.company_email,
402397
"howDidYouHear": event_instance.referral_source,
403-
"linkedinUrl": event_instance.linkedin_url,
404398
"jobTitle": event_instance.job_title,
405399
"numEmployees": event_instance.num_employees,
406400
"companyName": event_instance.company_name,
407401
"firstName": event_instance.first_name,
408402
"lastName": event_instance.last_name,
409-
"phoneNumber": event_instance.phone_number,
410403
}
411404
try:
412405
async with httpx.AsyncClient() as client:
@@ -447,20 +440,6 @@ def get_component(cls, **props):
447440
),
448441
class_name="grid grid-cols-2 gap-4",
449442
),
450-
input_field(
451-
"Linkedin Profile URL",
452-
"https://linkedin.com/in/your-profile",
453-
"linkedin_profile_url",
454-
"text",
455-
False,
456-
),
457-
input_field(
458-
"Phone number",
459-
"+1 (555) 123-4567",
460-
"phone_number",
461-
"tel",
462-
False,
463-
),
464443
text_area_field(
465444
"What are you looking to build? *",
466445
"Please list any apps, requirements, or data sources you plan on using",

0 commit comments

Comments
 (0)