true3dco / splashgen

Rapidly build landing pages in <20 lines of python
https://splashgen.sh
MIT License
252 stars 16 forks source link

Custom form #2

Closed lormayna closed 3 years ago

lormayna commented 3 years ago

Is there a way to add a custom form?

traviskaufman commented 3 years ago

Not yet, but this is definitely something we want to add in! Can you tell me a bit more about what information you'd want to get and where you'd want the form submission to go?

lormayna commented 3 years ago

I was thinking about creating a simple form and send the result to a POST HTTP endpoint (for example hosted on AWS Lambda, Azure Cloud function or Vercel). I know that I can make it embedding HTML, but having something already baked will be great

Il mar 25 mag 2021, 17:13 Travis Kaufman @.***> ha scritto:

Not yet, but this is definitely something we want to add in! Can you tell me a bit more about what information you'd want to get and where you'd want the form submission to go?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/true3dco/splashgen/issues/2#issuecomment-847951241, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMUJC7656WS4NPHO4HD4VDTPO5BLANCNFSM45OZ4SLQ .

traviskaufman commented 3 years ago

Something like this maybe?

site.call_to_action = Form(
  endpoint="https://my.endpoint/signup",
  inputs={
    "firstname": TextInput("First Name", required=True),
    "lastname": TextInput("Last Name", required=True),
    "email": EmailInput("Email Address", required=True),
    "role": SelectInput("Your Role", options=["CEO/Founder", "Engineer", "Finance", "Other"]),
  },
  submit_text="Join our waitlist")
lormayna commented 3 years ago

Yes, this will be great 😊

Il mer 26 mag 2021, 18:48 Travis Kaufman @.***> ha scritto:

Something like this maybe?

site.call_to_action = Form( inputs={ "firstname": TextInput("First Name", required=True), "lastname": TextInput("Last Name", required=True), "email": EmailInput("Email Address", required=True), "role": SelectInput("Your Role", options=["CEO/Founder", "Engineer", "Finance", "Other"]), }, submit_text="Join our waitlist")

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/true3dco/splashgen/issues/2#issuecomment-848940415, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMUJC66KWSABBSDTMLGSVDTPUQ7HANCNFSM45OZ4SLQ .

traviskaufman commented 3 years ago

Should be added in as of v0.0.28! pip install -U splashgen 👯 Let me know if you run into any issues!