By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,816 Members | 2,053 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,816 IT Pros & Developers. It's quick & easy.

help creating form for website

P: 13
Hello,
I'm more of a graphic web developer than intricate coder web developer so I don't host my clients sites. Each time a client wants a form it's with a different hosting service which has a different way to use forms. Again I'm having a problem with a new site I was thrown into, and I can't seem to make their form work. So I've tried some that have worked for me in the past but it's always hit or miss and a lot of wasted time. Do you know of some form code that I could implement and/or some general advice of how to handle this situation on a regular basis? Here is their original file. FYI, I don't know the company innovativa which is found in the first code. I think that was maybe an old hosting company.

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <title>Friends of Bradford Beach</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <LINK REL="stylesheet" TYPE="text/css" HREF="panama/styles.css" TITLE="innovativa style">
  6. <style type="text/css">
  7. .scroll_text { font-family: Verdana, Arial; font-size: 11px; color: #000000 ; background-color: #FFFFFF}
  8. #divUpControl{position:absolute; width:20; left:430; top:360; z-index:1; text-align: right}
  9. #divDownControl{position:absolute; width:20; left:430; top:385; z-index:1; text-align: right}
  10. #divContainer{position:absolute; width:378; height:265; overflow:hidden; top:135; left:40; clip:rect(0,378,265,0); visibility:hidden}
  11. #divContent{position:absolute; top:0; left:0}
  12.  
  13. </style>
  14. <script language="JavaScript">
  15. <!--
  16. function MM_swapImgRestore() { //v3.0
  17.   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  18. }
  19.  
  20. function MM_preloadImages() { //v3.0
  21.   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  22.     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  23.     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  24. }
  25.  
  26. function MM_swapImage() { //v3.0
  27.   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  28.    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  29. }
  30.  
  31. function MM_findObj(n, d) { //v4.01
  32.   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  33.     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  34.   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  35.   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  36.   if(!x && d.getElementById) x=d.getElementById(n); return x;
  37. }
  38. //-->
  39. </script>
  40. <script type="text/javascript">
  41.  
  42.   var _gaq = _gaq || [];
  43.   _gaq.push(['_setAccount', 'UA-22404100-2']);
  44.   _gaq.push(['_trackPageview']);
  45.  
  46.   (function() {
  47.     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  48.     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  49.     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  50.   })();
  51.  
  52. </script>
  53. </head>
  54.  
  55. <body leftmargin=20 topmargin=10 marginwidth=0 marginheight=0 scrolling=no onLoad="InitialiseScrollableArea(),"><FORM ACTION="http://scripts.digitalchainsaw.com/cgi-bin/mailto.exe" METHOD="post">
  56. <form name="form1" method="post" action="">
  57.   <div align="left"> 
  58.     <INPUT TYPE="hidden" Name="server" value="mail.innovativa.com">
  59.     <INPUT TYPE="hidden" NAME="Subject" value="Join FOBB">
  60.     <INPUT type="hidden" NAME="resulturl" value="http://www.friendsofbradfordbeach.org/Confirmation.htm">
  61.     <INPUT type="hidden" NAME="sendto" value="fobbmail@innovativa.com">
  62.     <table width="580" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  63.       <td valign="left"><font size="2" face="Arial, Helvetica, sans-serif"><strong>I 
  64.         will support Friends of Bradford Beach by:</strong></font></td>
  65.       </tr>
  66.       <tr> 
  67.         <td valign="left">&nbsp;</td>
  68.       </tr>
  69.       <tr> 
  70.         <td valign="left"><p><strong></strong> 
  71.             <label> 
  72.             <input type="radio" name="RadioGroup1" value="Becoming a member for $25.">
  73.             <font size="2" face="Arial, Helvetica, sans-serif"> Becoming a member 
  74.             for $25.</font></label>
  75.             <font size="2" face="Arial, Helvetica, sans-serif"><br>
  76.             <label> 
  77.             <input type="radio" name="RadioGroup1" value="Making an additional donation.">
  78.             Making an additional donation.</label>
  79.             <br>
  80.             <label> 
  81.             <input type="radio" name="RadioGroup1" value="Making a donation to the Watergarden Capital Campaign.">
  82.             Making a donation to the Watergarden Capital Campaign.</label>
  83.             <br>
  84.             <label> 
  85.             <input type="radio" name="RadioGroup1" value="Becoming a volunteer.">
  86.             Becoming a volunteer.</label>
  87.             <br>
  88.             <label> 
  89.             <input type="radio" name="RadioGroup1" value="Joining the email list so I can spread the word.">
  90.             Joining the email list so I can spread the word.</label>
  91.             </font><br>
  92.         </td>
  93.       </tr>
  94.       <tr> 
  95.         <td valign="left">&nbsp;</td>
  96.       </tr>
  97.       <tr> 
  98.         <td valign="left"><strong><font size="2" face="Arial, Helvetica, sans-serif">Please 
  99.           complete the following information: </font></strong></td>
  100.       </tr>
  101.       <tr> 
  102.         <td valign="left">&nbsp;</td>
  103.       </tr>
  104.       <td align="left"><div align="left"> <font face="Arial, Helvetica, sans-serif" size="2"><strong>First 
  105.           Name: </strong></font></div>
  106.         <b> 
  107.         <input name="FirstName" size=40 maxlength="40">
  108.         </b></td>
  109.       </tr>
  110.       <tr> 
  111.         <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>Last 
  112.             Name:</strong> </font></div>
  113.           <b> 
  114.           <input name="LastName" size=40 maxlength="40">
  115.           </b></td>
  116.       </tr>
  117.       <tr> 
  118.         <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>E-Mail: 
  119.             </strong> </font></div>
  120.           <b> 
  121.           <input name="EMail" size=40 maxlength="40">
  122.           </b></td>
  123.       </tr>
  124.       <tr> 
  125.         <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>Home 
  126.             Phone: </strong> </font></div>
  127.           <b> 
  128.           <input name="HomePhone" size=40 maxlength="40">
  129.           </b></td>
  130.       </tr>
  131.       <tr> 
  132.         <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>Cell 
  133.             Phone: </strong> </font></div>
  134.           <b> 
  135.           <input name="CellPhone" size=40 maxlength="40">
  136.           </b></td>
  137.       </tr>
  138.       <tr> 
  139.         <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>Work 
  140.             Phone: </strong> </font></div>
  141.           <b> 
  142.           <input name="WorkPhone" size=40 maxlength="40">
  143.           </b></td>
  144.       </tr>
  145.       <tr> 
  146.         <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>Address:</strong> 
  147.             </font></div>
  148.           <b> 
  149.           <input name="Address" size=40 maxlength="40">
  150.           </b></td>
  151.       </tr>
  152.       <tr> 
  153.         <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>City: 
  154.             </strong> </font></div>
  155.           <b> 
  156.           <input name="City" size=40 maxlength="40">
  157.           </b></td>
  158.       </tr>
  159.       <tr> 
  160.         <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>State: 
  161.             </strong> </font></div>
  162.           <b> 
  163.           <input name="State" size=40 maxlength="40">
  164.           </b></td>
  165.       </tr>
  166.       <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>Zip 
  167.           Code: </strong> </font></div>
  168.         <b> 
  169.         <input name="ZipCode" size=40 maxlength="40">
  170.         </b></td>
  171.       <tr> 
  172.         <td><b><font face="Arial, Helvetica, sans-serif" size="2"><br>
  173.           <input type="submit" value="Submit" name="submit">
  174.           </font></b></td>
  175.       </tr>
  176.       <tr> 
  177.         <td>&nbsp;</td>
  178.       </tr>
  179.       <tr> 
  180.         <td><b><font size="2" face="Arial, Helvetica, sans-serif">Please make 
  181.           check payable and mail to:</font></b><font size="2" face="Arial, Helvetica, sans-serif"><br>
  182.           Friends of Bradford Beach - The Park People<br>
  183.           Attn: Deb Lukovich<br>
  184.           703 E. Lexington Blvd.<br>
  185.           Whitefish Bay, WI 53217<br>
  186.           <b><br>
  187.           </b> </font><font size="2" face="Arial, Helvetica, sans-serif"><b>You 
  188.           will receive a receipt in the mail for your tax- deductible donation.<br>
  189.         THANK YOU for helping enhance Milwaukee's lakefront!</b> </font></td>
  190.       </tr>
  191.     </table>
  192.   </div>
  193. </form>
  194. </body>
  195. </html>
  196.  
  197.  
  198.  
and here is one solution I tried

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <title>Friends of Bradford Beach</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <LINK REL="stylesheet" TYPE="text/css" HREF="panama/styles.css" TITLE="innovativa style">
  6. <style type="text/css">
  7. .scroll_text { font-family: Verdana, Arial; font-size: 11px; color: #000000 ; background-color: #FFFFFF}
  8. #divUpControl{position:absolute; width:20; left:430; top:360; z-index:1; text-align: right}
  9. #divDownControl{position:absolute; width:20; left:430; top:385; z-index:1; text-align: right}
  10. #divContainer{position:absolute; width:378; height:265; overflow:hidden; top:135; left:40; clip:rect(0,378,265,0); visibility:hidden}
  11. #divContent{position:absolute; top:0; left:0}
  12.  
  13. </style>
  14. <script language="JavaScript">
  15. <!--
  16. function MM_swapImgRestore() { //v3.0
  17.   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  18. }
  19.  
  20. function MM_preloadImages() { //v3.0
  21.   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  22.     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  23.     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  24. }
  25.  
  26. function MM_swapImage() { //v3.0
  27.   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  28.    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  29. }
  30.  
  31. function MM_findObj(n, d) { //v4.01
  32.   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  33.     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  34.   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  35.   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  36.   if(!x && d.getElementById) x=d.getElementById(n); return x;
  37. }
  38. //-->
  39. </script>
  40. <script type="text/javascript">
  41.  
  42.   var _gaq = _gaq || [];
  43.   _gaq.push(['_setAccount', 'UA-22404100-2']);
  44.   _gaq.push(['_trackPageview']);
  45.  
  46.   (function() {
  47.     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  48.     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  49.     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  50.   })();
  51.  
  52. </script>
  53. </head>
  54.  
  55. <body leftmargin=20 topmargin=10 marginwidth=0 marginheight=0 scrolling=no onLoad="InitialiseScrollableArea(),">
  56.  
  57.   <div align="left">
  58.     <form method="POST" action="http://friendsofbradfordbeach.org/cgi-bin/formmail"><p>
  59.     <input TYPE="hidden" NAME="recipient" VALUE="kristal@kristalcleargraphics.com">
  60.     <INPUT TYPE="hidden" NAME="Subject" value="Join FOBB">
  61.     <table width="580" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  62.       <td valign="left"><font size="2" face="Arial, Helvetica, sans-serif"><strong>I 
  63.         will support Friends of Bradford Beach by:</strong></font></td>
  64.       </tr>
  65.       <tr> 
  66.         <td valign="left">&nbsp;</td>
  67.       </tr>
  68.       <tr> 
  69.         <td valign="left"><p><strong></strong> 
  70.             <label> 
  71.             <input type="radio" name="RadioGroup1" value="Becoming a member for $25.">
  72.             <font size="2" face="Arial, Helvetica, sans-serif"> Becoming a member 
  73.             for $25.</font></label>
  74.             <font size="2" face="Arial, Helvetica, sans-serif"><br>
  75.             <label> 
  76.             <input type="radio" name="RadioGroup1" value="Making an additional donation.">
  77.             Making an additional donation.</label>
  78.             <br>
  79.             <label> 
  80.             <input type="radio" name="RadioGroup1" value="Making a donation to the Watergarden Capital Campaign.">
  81.             Making a donation to the Watergarden Capital Campaign.</label>
  82.             <br>
  83.             <label> 
  84.             <input type="radio" name="RadioGroup1" value="Becoming a volunteer.">
  85.             Becoming a volunteer.</label>
  86.             <br>
  87.             <label> 
  88.             <input type="radio" name="RadioGroup1" value="Joining the email list so I can spread the word.">
  89.             Joining the email list so I can spread the word.</label>
  90.             </font><br>
  91.         </td>
  92.       </tr>
  93.       <tr> 
  94.         <td valign="left">&nbsp;</td>
  95.       </tr>
  96.       <tr> 
  97.         <td valign="left"><strong><font size="2" face="Arial, Helvetica, sans-serif">Please 
  98.           complete the following information: </font></strong></td>
  99.       </tr>
  100.       <tr> 
  101.         <td valign="left">&nbsp;</td>
  102.       </tr>
  103.       <td align="left"><div align="left"> <font face="Arial, Helvetica, sans-serif" size="2"><strong>First 
  104.           Name: </strong></font></div>
  105.         <b> 
  106.         <input name="FirstName" size=40 maxlength="40">
  107.         </b></td>
  108.       </tr>
  109.       <tr> 
  110.         <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>Last 
  111.             Name:</strong> </font></div>
  112.           <b> 
  113.           <input name="LastName" size=40 maxlength="40">
  114.           </b></td>
  115.       </tr>
  116.       <tr> 
  117.         <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>E-Mail: 
  118.             </strong> </font></div>
  119.           <b> 
  120.           <input name="EMail" size=40 maxlength="40">
  121.           </b></td>
  122.       </tr>
  123.       <tr> 
  124.         <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>Home 
  125.             Phone: </strong> </font></div>
  126.           <b> 
  127.           <input name="HomePhone" size=40 maxlength="40">
  128.           </b></td>
  129.       </tr>
  130.       <tr> 
  131.         <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>Cell 
  132.             Phone: </strong> </font></div>
  133.           <b> 
  134.           <input name="CellPhone" size=40 maxlength="40">
  135.           </b></td>
  136.       </tr>
  137.       <tr> 
  138.         <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>Work 
  139.             Phone: </strong> </font></div>
  140.           <b> 
  141.           <input name="WorkPhone" size=40 maxlength="40">
  142.           </b></td>
  143.       </tr>
  144.       <tr> 
  145.         <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>Address:</strong> 
  146.             </font></div>
  147.           <b> 
  148.           <input name="Address" size=40 maxlength="40">
  149.           </b></td>
  150.       </tr>
  151.       <tr> 
  152.         <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>City: 
  153.             </strong> </font></div>
  154.           <b> 
  155.           <input name="City" size=40 maxlength="40">
  156.           </b></td>
  157.       </tr>
  158.       <tr> 
  159.         <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>State: 
  160.             </strong> </font></div>
  161.           <b> 
  162.           <input name="State" size=40 maxlength="40">
  163.           </b></td>
  164.       </tr>
  165.       <td align="left"><div align="left"><font face="Arial, Helvetica, sans-serif" size="2"><strong>Zip 
  166.           Code: </strong> </font></div>
  167.         <b> 
  168.         <input name="ZipCode" size=40 maxlength="40">
  169.         </b></td>
  170.       <tr> 
  171.         <td><b><font face="Arial, Helvetica, sans-serif" size="2"><br>
  172.           <input type="submit" value="Submit" name="submit">
  173.           </font></b></td>
  174.       </tr>
  175.       <tr> 
  176.         <td>&nbsp;</td>
  177.       </tr>
  178.       <tr> 
  179.         <td><b><font size="2" face="Arial, Helvetica, sans-serif">Please make 
  180.           check payable and mail to:</font></b><font size="2" face="Arial, Helvetica, sans-serif"><br>
  181.           Friends of Bradford Beach - The Park People<br>
  182.           Attn: Deb Lukovich<br>
  183.           703 E. Lexington Blvd.<br>
  184.           Whitefish Bay, WI 53217<br>
  185.           <b><br>
  186.           </b> </font><font size="2" face="Arial, Helvetica, sans-serif"><b>You 
  187.           will receive a receipt in the mail for your tax- deductible donation.<br>
  188.         THANK YOU for helping enhance Milwaukee's lakefront!</b> </font></td>
  189.       </tr>
  190.     </table>
  191.   </div>
  192.                   <input TYPE="hidden" NAME="redirect" VALUE="http://friendsofbradfordbeach.org/Confirmation.htm">
  193.                   <input TYPE="hidden" NAME="env_report" VALUE="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT">
  194.       </p>
  195. </form>
  196. </body>
  197. </html>
  198.  
  199.  
  200.  
Jan 6 '12 #1
Share this Question
Share on Google+
4 Replies


Dormilich
Expert Mod 5K+
P: 8,639
I can't seem to make their form work.
work in what regard? a form is just a means of sending user supplied data for processing to a server. what the server does with the data is out of the realm of a HTML form.

Do you know of some form code that I could implement and/or some general advice of how to handle this situation on a regular basis?
this always depends on what the form processor is supposed to do.


PS. if you create such forms on a regular basis, I recommend to look into how to code forms with CSS. using tables for layout is as outdated as the <font> tag is.
Jan 7 '12 #2

P: 13
Thank you for your reply.

Ultimately, when I click submit, it no longer works and I don't know what part of the code isn't communicating with the servers correctly because I'm coming into this in the middle of the project and forms are definitely not my strong point. The hosting company was not much help other than telling me they were php based. It seems every client I have uses a different hosting service and I can never use the same form twice (the hidden tags that is)

In this case, I simply want to make a quick fix to their already exisiting form whether that be changing the "hidden" posting language or whatever I need to make it communicate with the server correctly. Any ideas?
Jan 8 '12 #3

Dormilich
Expert Mod 5K+
P: 8,639
it depends on what the server script does. adding a hidden field that is not processed on the server is just useless input.

the communication with the server is only influenced by the form element. action points to the server script, method defines the transfer method, accept the MIME type & encoding is rather self-explanatory (mind that there are default settings for that). what you ultimately need depends on the server script.
Jan 8 '12 #4

P: 13
So since you say it depends on what the server script does, and since I work with different clients who choose to be on different servers, there isn't a general form language I can use all the time. See, I'm not a coder at all. I can edit the code I create in Dream Weaver, but I can't really write it from scratch so when my forms don't work, it's very hard for me to figure out why? Hence, I can't figure out why this form won't work.

You also said what I need ultimately depends on the server script, so do I need the technical support staff of their hosting company to tell me what their servers need for script or am I just supposed to know that ... because they weren't much help when I contacted them. I usually get better help from other hosting companies, but maybe it really is my job to know how to speak to their servers?

Any thoughts on a solution to that?Thanks so much!
Jan 9 '12 #5

Post your reply

Sign in to post your reply or Sign up for a free account.