@@ -269,13 +269,6 @@ async def on_submit(self, form_data: dict[str, Any]):
269269 yield rx .call_script (
270270 f"try {{ ko.identify('{ form_data .get ('email' , '' )} '); }} catch(e) {{ console.warn('Koala identify failed:', e); }}"
271271 )
272- if is_small_company (form_data .get ("number_of_employees" , "" )):
273- yield rx .toast .success (
274- "Thanks for your interest in Reflex! We'll be in touch soon." ,
275- position = "top-center" ,
276- )
277- yield rx .redirect (CAL_REQUEST_DEMO_URL )
278- return
279272 notes_content = f"""
280273Name: { form_data .get ("first_name" , "" )} { form_data .get ("last_name" , "" )}
281274Business Email: { form_data .get ("email" , "" )}
@@ -284,14 +277,17 @@ async def on_submit(self, form_data: dict[str, Any]):
284277Number of Employees: { form_data .get ("number_of_employees" , "" )}
285278Internal Tools to Build: { form_data .get ("internal_tools" , "" )}
286279How they heard about Reflex: { form_data .get ("how_did_you_hear_about_us" , "" )} """
287-
288280 params = {
289281 "email" : form_data .get ("email" , "" ),
290282 "name" : f"{ form_data .get ('first_name' , '' )} { form_data .get ('last_name' , '' )} " ,
291283 "notes" : notes_content ,
292284 }
293285
294286 query_string = urllib .parse .urlencode (params )
287+ if is_small_company (form_data .get ("number_of_employees" , "" )):
288+ yield rx .redirect (f"{ CAL_REQUEST_DEMO_URL } ?{ query_string } " )
289+ return
290+
295291 cal_url_with_params = f"{ CAL_ENTERPRISE_FOLLOW_UP_URL } ?{ query_string } "
296292
297293 yield is_sending_demo_form .push (False )
0 commit comments