These features are provided by CutnPaste:
- REQUIRED: Choosen fields must be completed or form will not be sent! Popup warning tells what field is not filled.
- REDIRECT TO YOUR OWN RESPONSE PAGE!
- AUTOMATED EMAIL RESPONSE TO VISITOR'S EMAIL
- CAN HAVE UNLIMITED NUMBER OF FIELDS
|
AN ADDITIONAL FEATURE ADDED TO THE BASIC CSB FORM:
- DISABLE ENTER: to stop multiple partial forms when your visitor presses enter before completing the form
|
THIS IS THE ORIGINAL CSB FORM
Send button removed from this form to make it NON-FUNCTIONAL.
|
<!-- start the form section --> You will NOT use this part of CSB's code!
<form action="hXXp://csbmail.globalscape.com/cgi-bin/csbmail/csbmail.pl" method="POST" enctype="application/x-www-form-urlencoded"><input type="hidden" name="tlx_SortOrder" value="FirstName,LastName,Email,Company,Address1,Address2,City,State,Zip,Phone,MailingList">
<input type="hidden" name="tlx_FormIndex" value="2"><input type="hidden" name="tlx_OKMessage" value="Thank you for your subscription."><input type="hidden" name="tlx_SendMode" value="1"><input type="hidden" name="tlx_Subject" value="A subscription form from website"><input type="hidden" name="tlx_EmailTo" value="111@111.org">
<!-- form field section -->
<table cellpadding="0" cellspacing="1" border="0" align="center">
<tr>
<td align="left">First Name:<br>
<input type="text" name="FirstName" size="30" maxlength="100"></td>
</tr>
<tr>
<td align="left">Last Name:<br>
<input type="text" name="LastName" size="30" maxlength="100"></td>
</tr>
<tr>
<td align="left">Email:<br>
<input type="text" name="Email" size="30" maxlength="100"></td>
</tr>
<tr>
<td align="left">Company:<br>
<input type="text" name="Company" size="30" maxlength="100"></td>
</tr>
<tr>
<td align="left">Address Line 1:<br>
<input type="text" name="Address1" size="30" maxlength="100"></td>
</tr>
<tr>
<td align="left">Address Line 2:<br>
<input type="text" name="Address2" size="30" maxlength="100"></td>
</tr>
<tr>
<td align="left">City:<br>
<input type="text" name="City" size="30" maxlength="100"></td>
</tr>
<tr>
<td align="left">State:<br>
<input type="text" name="State" size="30" maxlength="100"></td>
</tr>
<tr>
<td align="left">Zip:<br>
<input type="text" name="Zip" size="10" maxlength="10"></td>
</tr>
<tr>
<td align="left">Phone Number:<br>
<input type="text" name="Phone" size="14" maxlength="14"></td>
</tr>
<tr>
<td>
<input type="checkbox" name="MailingList" value="yes"> By submitting this form, I acknowledge that I have sent my subscription via credit card. Once receipt of funds has been confirmed, I understand I will receive the next published issue of the magazine.</td>
</tr>
</table>
<!-- the end of the form -->
<tr>
<td align="right"><input type="reset"> <input type="submit" value="Send" name="tlx_send"></td>
</tr>
</form>
|
When I refer to webgem (Trellix), it also means Insert > HTML in CSB.
To capture the codes below, press Select All link, then COPY the contents.
I have made notes in code below to highlight etc and it might effect functionality! Use the Select All choice above each code!
|
webgem #1: DISABLE ENTER KEY
Stops the form from being submitted by pressing the enter key!
Besides adding the code below in it's own webgem,
onkeypress="return handleEnter(this, event)" to each field description
<!-- Start Gem Insert your own HTML -->
<script type="text/javascript">
/***********************************************
* Disable "Enter" key in Form script- By Nurul Fadilah(nurul@REMOVETHISvolmedia.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
function handleEnter (field, event) {
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
if (keyCode == 13) {
var i;
for (i = 0; i < field.form.elements.length; i++)
if (field == field.form.elements[i])
break;
i = (i + 1) % field.form.elements.length;
field.form.elements[i].focus();
return false;
}
else
return true;
}
</script>
|
webgem #2: START THE FORM (= step 1 on basic 1-2-3 method)
Sign up at CutnPaste.com and define the fields for a form.
Copy the code that CutnPaste provides and place that code in this webgem.
This is a sample of how the code looks - do't copy it! Sign up here for your own!
<!- Form Processing, by Cut and Paste Scripts. Hosted CGI, with NO adverts and FREE. http://www.cutandpastescripts.com -!>
<form method=POST action="http://www.cutandpastescripts.com/cgi-bin/formprocessing/forms.pl">
<input type=hidden name="activenumber" value="xxxxxxxxxxxxxxxx">
<input type="hidden" name="username" value="your usercode">
<!- Cut and Paste Scripts 2000 -!>
|
webgem #3: FORM FIELDS
Modified code notes:
USE THIS PART OF THE CODE THAT YOU CREATED WITH CSB FORM.
My code is shown here as a reference only:
<table cellpadding="0" cellspacing="1" border="0" align="center">
<tr>
<td align="left">First Name:<br>
<input type="text" name="FirstName" size="30" maxlength="100" onkeypress="return handleEnter(this, event)"></td>
</tr>
<tr>
<td align="left">Last Name:<br>
<input type="text" name="LastName" size="30" maxlength="100" onkeypress="return handleEnter(this, event)"></td>
</tr>
<tr>
<td align="left">Email:<br>
<input type="text" name="Email" size="30" maxlength="100" onkeypress="return handleEnter(this, event)"></td>
</tr>
<tr>
<td align="left">Company:<br>
<input type="text" name="Company" size="30" maxlength="100" onkeypress="return handleEnter(this, event)"></td>
</tr>
<tr>
<td align="left">Address Line 1:<br>
<input type="text" name="Address1" size="30" maxlength="100" onkeypress="return handleEnter(this, event)"></td>
</tr>
<tr>
<td align="left">Address Line 2:<br>
<input type="text" name="Address2" size="30" maxlength="100" onkeypress="return handleEnter(this, event)"></td>
</tr>
<tr>
<td align="left">City:<br>
<input type="text" name="City" size="30" maxlength="100" onkeypress="return handleEnter(this, event)"></td>
</tr>
<tr>
<td align="left">State:<br>
<input type="text" name="State" size="30" maxlength="100" onkeypress="return handleEnter(this, event)"></td>
</tr>
<tr>
<td align="left">Zip:<br>
<input type="text" name="Zip" size="10" maxlength="10" onkeypress="return handleEnter(this, event)"></td>
</tr>
<tr>
<td align="left">Phone Number:<br>
<input type="text" name="Phone" size="14" maxlength="14" onkeypress="return handleEnter(this, event)"></td>
</tr>
<tr>
<td>
By submitting this form, I acknowledge that I have sent my subscription via credit card. Once receipt of funds has been confirmed, I understand I will receive the next published issue of the magazine.</td>
</tr>
</table>
|
webgem #4: END THE FORM BUTTONS (= step 2 on basic 1-2-3 method)
<INPUT TYPE="submit" value="Send" name="tlx_send">
<INPUT TYPE="reset">
</form>
|
Use the form fields section of the code as is like this sample above.
Or if you want to place your codes into a customized table to match your website (like 1-2-3 method shown on the Design a Form with Tables):
Place each <input> code into its own webgem (Insert > HTML) in a table between the starting and ending codes as shown.
Example - this table row came from the CSB form above. The part you want to use in a separate webgem for a Address field is shown in red bold lettering:
<tr> <td><font size=-1 face="arial">Address: </font></td><td><font size=-1 face="arial"><input type="Text" name="Address1" size="30" maxlength="100"></font></td> </tr>
|