Help with form integration

Hi

I am new to Webflow and have searched the forums. I would like to ask for help in integrating forms produced in Webflow with my marketing system. I have seen the Aweber article. But my external code is different.

Below is the code I am given, I would love to get this working ASAP

Thanks in advance

Paul

<script>
function isValidPhone(phone_number) 
{ 
var phone = phone_number.replace(/[\(\)\.\-\ ]/g, ''); 
if (phone == "") { return false; 
} else if (isNaN(parseInt(phone))) { return false; 
} else if (phone.length < 10 || phone.length >= 15) { return false; 
} return true; 
} 
function isValidEmail(email) 
{ 
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; 
if(reg.test(email) == false) { return false; } return true; 
} 
function checkForm(myForm) { var errors = ""; 
if (myForm.f_firstname.value == "") errors = "Please enter your First Name.\n"; 
if (!isValidEmail(myForm.f_email.value)) errors += "Please enter a Valid Email.\n"; 
if (errors != "") { alert(errors); return false; } else { return true; } } 
</script> 

<form action="http://exitus.theultimatesystem.com/ms/external" method="post" onSubmit="javascript:return checkForm(this);">
<input type="hidden" name="event" value="lp_form">
<input type="hidden" name="sub_event" value="visit1">
<input type="hidden" name="revisit_event" value="revisit1">
<input type="hidden" name="val_required" value="f_firstname,f_email">
<input type="hidden" name="category_id" value="66394">
<input type="hidden" name="campaign_id" value="9024">

First Name: <input name="f_firstname" type="text" maxlength="50" /><br/>
Last Name: <input name="f_lastname" type="text" maxlength="50" /><br/>
Email Address: <input name="f_email" type="text" maxlength="64" /><br/>
Phone Number: <input name="f_phone" type="text" maxlength="20" /><br/>
<input name="f_optin_exists" type="hidden" value="1" /> <input name="f_optin" value="1" type="checkbox" CHECKED />Yes! Please add me to your mailing list today!<br/>
<input name="Submit" type="Submit" value="Submit" />
</form>

Hi @quittoo

You are going to have to edit your post with pre formated text so we can see your code. Highlight your code and click the button </> in the tool bar.

This is the difference between pre formatted text and not

<h1>This is the difference between pre formatted text and not</h1>

Thanks David

Done

Told you I was new!

Regards

Paul

Ok as a newbie I am not sure how to progress past this point!

If there is anyone that could help out here it would be great.

Perhaps what I am trying to achieve might not be even be possible.

It would be nice to know

Anyway thanks again

Paul

Hi @quittoo, the steps in the post that pertain to aweber integration: http://forum.webflow.com/t/aweber-form-integration/8207/4, are pretty much the same as the integration for this form integration.

Where the post talks about the aweber mail script, you substitute that with the form url you are posting to:

http://exitus.theultimatesystem.com/ms/external

In step 2, you copy the hidden fields from the code they provided you into an embed widget placed inside your form, just above your submit button:

<input type="hidden" name="event" value="lp_form">
<input type="hidden" name="sub_event" value="visit1">
<input type="hidden" name="revisit_event" value="revisit1">
<input type="hidden" name="val_required" value="f_firstname,f_email">
<input type="hidden" name="category_id" value="66394">
<input type="hidden" name="campaign_id" value="9024">

The fields in the code they sent you are named liked f_firstname, f_lastname etc, so give your Webflow form input fields, the same names as used in the code.

​I hope this helps. If not, please let me know – I’m happy to assist further! :slight_smile: Cheers, Dave

Thanks Cyberdave!

I will try that.

The code also includes a check box that is ticked, which forms part of the ‘double Opt in’ How would I integrate this into the form. I am excited to have a great looking form that will opt people into my marketing system.

<input name="f_optin_exists" type="hidden" value="1" /> <input name="f_optin" value="1" type="checkbox" CHECKED />Yes! Please add me to your mailing list today!<br/>

I spoke with their dev and they do not have any other way of using the code they have provided

Any help would be much welcomed

Thanks so much

Paul

Hi, yep, add the hidden field for the checkbox to the embed widget:

<input name="f_optin_exists" type="hidden" value="1" />

Make sure the webflow checkbox has same name as the checkbox in the code “f_optin”.

​I hope this helps. cheers, Dave :slight_smile:

Hi Dave

Thanks for your help

The data is still not being added to my database

Where can I enter this information in Webflow, I believe it is the form itself

First Name: <input name="f_firstname" type="text" maxlength="50" /><br/>
Last Name: <input name="f_lastname" type="text" maxlength="50" /><br/>
Email Address: <input name="f_email" type="text" maxlength="64" /><br/>
Phone Number: <input name="f_phone" type="text" maxlength="20" /><br/>
<input name="f_optin_exists" type="hidden" value="1" /> <input name="f_optin" value="1" type="checkbox" CHECKED />Yes! Please add me to your mailing list today!<br/>
<input name="Submit" type="Submit" value="Submit"

I am still NOT 100% sure where everything should be placed.

You can see the form I am testing in here: http://lcp1.webflow.io

Any further help would be greatly apreciated

Thanks so much

Paul

Hi @quittoo, thanks for the published link, I do need that :slight_smile: I also need the read-only link to the site, can you share that? Learn web design with free video courses and tutorials | Webflow University, I am happy to take a look and find out what’s happening :slight_smile: Cheers, Dave

Hi @cyberdave

I really appreciate your help on this.

Here is my share link as requested:

https://preview.webflow.com/preview/lcp1?preview=39edebcc30d9ce75a0f99ddfb0a355d4

I am just not sure where everything should be placed

When I fill out the form, I get taken to the target page BUT my info is not added to my list

Thanks again

Paul

Hi @quittoo, thanks for your update :slight_smile: I took a peek at the site and one thing to check is that you have the right url for the action property. See my screenshot, flip the urls around so that the url currently being used in the redirect is used for the action property and vice versa for the the redirect url. Check that, republish and try again and let me know how it works. I am happy to take a look further :slight_smile: Cheers, Dave

Hi @cyberdave

Thanks for that, I have swapped those around

I now have the info going to my database… all apart from the last name.

I have checked it numerous times and I cannot see why it is not being captured

The redirect URL does no seem to come into play.

Many thanks

Paul

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