Streaming live at 10am (PST)

How to disable a Webflow form so it uses custom code?


#1

I am looking for the simplest way to disable an email submission form on my exported site. My dev team has added some custom Javascript to the email form but it's also sending an email to my Webflow form as well.

What's the best way to disable this now that I've exported it?

Thanks,

JFly


#2

Change the form tag parameters to match your local requirements.

I'm guessing you want to send the data into a mail message or into a database... ?

Change the form tag - add a post method and an action

<form name="myform" action="myaction.php" method="post">

You can use javascript in the action as well. Stop the process using void(),

EDIT: you could also do an onSubmit with js or $().submit(function)) with a false return.


#3

Thanks @Revolution

Can you give me more info on how to allow this to use a Javascript? I'm not very versed in Javascript but I can see the dev team attached a script which is linking to the form ID #email-form. Here's the script they've added.

Will this also allow the built-in "Success Message" to appear after submit or does that get disabled too?


#4

You would have to build your own success / fail message.

Well... I guess you could tie your action to the website success / fail message with the id...
- I just haven't had the time to try.

As usual my plate is full. It's counter-production to complain that people want to hire you smile

I'd recommend searching the net for javascript form submit / onsubmit.

The js call would be used in the action of the form tag below.

or

<form name="myform" omsubmit="some_action();">

If you have a php server... just call a php script and have the script send the message out or write to a the db.

Only thing you have to worry about the validating the data. This is where someone could inject malicious code into your form submit.

stackoverflow.com is a good resource for just about everything.


#5

I wanted to see if there was a simple way to keep the "Success" and "Error" part of the page working but disable the email send functionality.


#6

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.