07 Sep 2010
Support Center
»
Knowledgebase
»
Form CAN be blank when using my own confirmation page!
Form CAN be blank when using my own confirmation page!
Solution
This is a tricky one that we're trying to come up with a solution. You only get this when you have your own custom confirmation page. The way it normally works, with OUR confirmation page, is we do the checking on our page if there actually IS a email address. If not, we give a proper error. Now, when you provide your own confirmation page, we can not do the checking on your page. This is normally done in JaveScript, and is done either on the page where the details is filled in, or, it's done on the confirmation page where the details is received. For the case where you provide your own confirmation page, we need to SOMEHOW check the data BEFORE we deliver the confirmation page. This is MUCH trickier than it sounds! We ARE working on this though!!! For now, there IS a way to NOT allow blank forms, but, you need to do it on the site where you have the opt-in forms. You basically do a bit of JavaScript on the page. Here is a BRILLIANT way of doing this:
Place it on the FIRST line after the <BODY> tag in your HTML. <script language="JavaScript"> <!-- /*********************************************** * Required field(s) validation v1.10- By NavSurf * Visit Nav Surf at
http://navsurf.com
* Visit
http://www.dynamicdrive.com/
for full source code ***********************************************/ function formCheck(formobj){ // Enter name of mandatory fields var fieldRequired = Array("FormValue_Fields[CustomField1467]", "FormValue_Fields[CustomField1468]", "FormValue_Fields[EmailAddress]", "FormValue_Fields[CustomField1469]"); // Enter field description to appear in the dialog box var fieldDescription = Array("First Name", "Last Name", "Email Address", "Website URL"); // dialog message var alertMsg = "Please complete the following fields:\n"; var l_Msg = alertMsg.length; for (var i = 0; i < fieldRequired.length; i++){ var obj = formobj.elements[fieldRequired[i]]; if (obj){ switch(obj.type){ case "select-one": if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){ alertMsg += " - " + fieldDescription[i] + "\n"; } break; case "select-multiple": if (obj.selectedIndex == -1){ alertMsg += " - " + fieldDescription[i] + "\n"; } break; case "text": case "textarea": if (obj.value == "" || obj.value == null){ alertMsg += " - " + fieldDescription[i] + "\n"; } break; default: } if (obj.type == undefined){ var blnchecked = false; for (var j = 0; j < obj.length; j++){ if (obj[j].checked){ blnchecked = true; } } if (!blnchecked){ alertMsg += " - " + fieldDescription[i] + "\n"; } } } } if (alertMsg.length == l_Msg){ return true; }else{ alert(alertMsg); return false; } } // --> </script> Replace all FormValue_Fields[CustomField1467] with your OWN custom field codes. It will JUST be the NUMBER which changes. NOTHING ELSE. That is a quick and easy way to do it. If you want, we can help you getting this setup on your own pages. It's no more than a couple of minutes work.
Article Details
Article ID:
40
Created On:
14 Dec 2009 11:28 AM
This answer was helpful
This answer was not helpful
User Comments
Add a Comment
Sharing is good. If you have a comment about this entry, please feel free to share. The comments might be reviewed by our staff, and may require approval before being posted. Questions posted will not be answered. Please submit a Ticket for support requests.
Fullname:
Email: (Optional)
Comments:
Back
Login
[Lost Password]
Email:
Password:
Remember Me:
Search
-- Entire Support Site --
Knowledgebase
Downloads
Article Options
Add Comment
Print Article
PDF Version
Email Article
Add to Favorites
Home
|
Register
|
Submit a Ticket
|
Knowledgebase
|
News
|
Downloads
Language:
English (U.S.)
Help Desk Software
Help Desk Software By Kayako SupportSuite v3.70.02