Streaming live at 10am (PST)

How To on using your own form processor with webflow form


#1

We use a form processor for forms in webflow that works really well. Advantages to this is if you ever leave webflow your website forms don't break. Also not having to rely on a third party to process the forms or issues in not receiving form data, or any limitations on number of forms received and potential associated costs, etc.

In case it helps I am making this post to give instructions on what we use and how it works.

The form processor script we use is formmail.php found at www.tectite.com. Totally free, although they have some paid service whereby you can use their wizard to build forms but we don't use it or need it and you really shouldn't either as the script will do everything you need. Too, bears mentioning you can rename this form to whatever you want.

Important thing is to configure the script for the particular form/website and that is pretty easy to do generally there are only a couple of lines in the script that need modified.

In particular around line 442 of the script is the $target_email. In between the quotes you'd put the domain url without www or anything just like "domain.com"

The next line "def_alert" is if you the developer or someone needing to track anything technical from the form responses needs such data then you'd put your or their email in between the quotes there. Then you will get an email when/if a form is submitted and there are any problems (errors) or for example when/if the form script itself needs updated as in using an older version.

The only other thing we will change in the form is at or around line 468 called "$at_mangle". there we will put something funky in between the quotes like "&george@". This fools spammers and is totally cool and so much fun to do.

Works like this. When you build your form you have to make a hidden value for the email address the form is going to be emailed to. Problem is spammers can scrape this. But now with this feature let us say your email address is email@email.com. Now you would make it (in the case like our at_mangle shown above) email&george@email.com. Of course, there is no email&george email address so it will kick back assuming you have your server email system setup correctly to fail if an invalid email address is used. And spammers cannot see or know the real email address.

Then all you have to do is upload that formmail.php file to the root directory where the webpage files are.

Now in your webflow form block you simply insert an html imbed. In the embed you need these values:

<input type="hidden" name="recipients" value="youremail&george@yourdomain.com">
<input type="hidden" name="good_url" value="http://www.yourdomain.com/success.html">
<input type="hidden" name="bad_url" value="http://www.yourdomain.com/failure.html">
<input type="hidden" name="subject" value="Inquiry from yourdomain.com Website">

Of course, you need to build the success.html page and the failure.html page and/or change that to whatever you want to call them but you do need a success and a failure page. Same with the recipient value in this example we are using the "$at_mangle" being "&george@" we described in this post to obfuscate the email address and the php form will replace that value with "@" when it processes the form. We use the @ sign in our mangle simply to fool scrapers into thinking it is a real email address so hopefully they'll just move on but you could use anything.

Lastly you have to tell the form where to find the processor file. Under the form setting choose the method of "post" and the action is http://www.yourdomain.com/formmail.php

'Voila, you have your own form processing now and don't have to rely on any third party services.

Hope it helps..


Forms processing
PHP Email Form without webflow or 3rd party
Forms on Third Party Hosting
Contact Forms on exported code
Simpel contact form on exported site
Any Suggestions on Replacing Exported Forms of Webflow due to GDPR?
#2

That is great! Thanks a ton for sharing :slight_smile:


Forms - without Hosting at Webflow
#3

That's a great idea. Will try to implement it to test.


#4

thanks, looks promising and will certainly try this solution!


#5

@adtastic Great work with the detailed explanation!

Can this be done without a redirect? Just normal form activity that after submission if successful will change to successful state and if error will be error state?


#6

Likely but you’d probably be better served actually inquiring about this on tectite.com there are a ton of resources on how to use the form processor and maybe something there in that regard.


#7

Thanks!

I found a solution on this thread that along with any POST/GET action can switch states with the native forms of Webflow.


#8

Thanks for the article. After configuring everything, this email arrives:

The following error occurred in FormMail:
no_recipients


Error = The form has an internal error - no actions or recipients were specified.

this is the link: http://www.gerbiostore.com.ar/formtest/index.html

Could you tell me what I’m confusing about? Thank you very much!


#9

Same here… any ideas?


#10

Same here…

The following error occurred in FormMail :
no_recipients


Error=The form has an internal error - no actions or recipients were specified.


#11

I got it!

“Now in your webflow form block you simply insert an html imbed.” I was embedding the code before the <form>, not inside it.

I’m super happy with this Formmail solution, it seems to work pretty well on my exported site.

Thank you @adtastic


#12

Glad you were able to figure it out @PabloMontero . I use it on dozens of client sites with no problems. You can even add captcha. A little trickier put pretty straightforward.


#13

Do you mean reCaptcha?

It was very easy to use webflow’s reCaptcha block and configure the settings. And it works great.

Do you use this option or do you follow the instruction of recaptcha from Tectite?
https://www.tectite.com/fmhowto/recaptchav2.php


#14

@PabloMontero what did you do to get this script working? I set a DefAlert and all the form info comes through but as an error. I get an error on the page and it says this in the email:

The following error occurred in FormMail :
no_recipients


Error=The form has an internal error - no actions or recipients were specified.

What were your exact settings if you don’t mind telling me? I’m sure I’m doing one thing wrong and it’s creating the error. Thanks in advance for the help! About ready to pull my hair out :exploding_head:

Here are my settings:

HTML embedd: (I have tried putting it in the Form Block as well as in the Form itself. Tried with and without the $at_mangle)

<input type="hidden" name="recipients" value="myname@mywebsite.com">
<input type="hidden" name="good_url" value="http://www.mywebsite.com/request-call-success.html"><input type="hidden" name="bad_url" value="http://www.mywebsite.com/request-call-error.html">
<input type="hidden" name="subject" value="Inquiry from mywebsite.com Website">

Fields I changed in the php script:

442 $TARGET_EMAIL = array(EMAIL_NAME . "@mywebsite\.com");

445 $DEF_ALERT = "myname@mywebsite.com";

465 $AT_MANGLE = “&george@”;

In the form options in WF, I tried filling in the redirect URL as “/request-call-success” and also tried leaving it blank.

Action is: http://www.mywebsite.com/formmail.php

Method: POST


#15

Well you figured it out. I was going to refer you to: https://www.tectite.com/vbforums/showthread.php?6320-The-following-error-occurred-in-FormMail-no_recipients which has a long-winded version of the answer you found.


#16

WOW! Definitely going to add this! I’m going to add G-Suite for email service because my domains are through Google anyway. I hope this isn’t entirely off topic, but

Can you post forms to google sheets without coding scripts using O-Auth, refreshes, etc…?

For example, can anyone recommend a free, automated process to send gmail data containing info entered into this form to parse and post to a new google sheets row? At the volume I’m using it, Zapier would probably be free, but I want to avoid AS MUCH 3rd party usage as possible wherever possible.

AWESOME post! Thanks!


#17

Hi Rdrr,

formmail.php

$TARGET_EMAIL = array($EMAIL_NAME . "@YOURMAIL\.COM$"); Notice the \
$DEF_ALERT = "mail@youradministrator.com";
$AT_MANGLE = "email@";
$TEMPLATEDIR = "  "; this field is not working for me, I don't know well the route of my client's server
$TEMPLATEURL = "http://www.myweb.com/fmtemplates/"; this field works good

HTML Embed Inside <form>

<input type="hidden" name="recipients" value="YOUR_REAL_EMAILemail@yourmail.com"> Notice the mangle "email"
<input type="hidden" name="good_url" value="http://www.yourmail.com/thanks.html">
<input type="hidden" name="bad_url" value="http://www.yourmail.com/error.html">
<input type="hidden" name="subject" value="Quote from your website">
<input type="hidden" name="mail_options" value="HTMLTemplate=mytemplate.htm,NoPlain,TemplateMissing=N/A" />

13

Finally, I formatted the email following Tectite indications.

Let me know if you get it!


Simpel contact form on exported site
#18

Then all you have to do is upload that formmail.php file to the root directory where the webpage files are.

How do you do this?

//Edit: Turns out YOU CANNOT USE YOUR OWN FORM PROCESSOR on with webflow form.

TO USE PHP, YOU MUST EXPORT YOUR CODE and host elsewhere.
Once you do that, it’s NO LONGER A WEBFLOW FORM anyway HAHAHAAHAHA. This guy must be getting affiliate $ kickbacks.


#19

@PabloMontero Got it working! I messed up the recipients in the html embed code. I should have wrote the email with the mangle included. (I think I tried it before without a mangle set in the php…should have worked then right?)

Anyways it’s working now and it’s better to have the mangle!

Also I’m curious, What are you using the template for?

Thank you so much for the help! This makes things 100X easier when hosting on a 3rd party server!


#20

@adtastic Thanks for taking the time to post this! Super helpful! Was trying to find an easy solution for forms when using 3rd party hosting and this is the solution!