Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> formularz - spolszczenie, problem ze spolszczenie w formularzu
Kamalo89
post 27.09.2013, 19:34:25
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 27.09.2013

Ostrzeżenie: (0%)
-----


Witam.
Mam pewien problem, chciałbym spolszczyć formularz, dotąd mi się wszystko udało opróćz tego, żę po wysłaniu formularza na meila przychodzą mi angielskie wyrazy: Name, Email, Message. A także nie mogę formatować ich stylu css. Głowię sięnad tym już dłuższy czas. Prosiłbym o wskazanie jak to zrobić lib jakieś wskazówki.
link do pakietu formularza
http://www.html-form-guide.com/contact-for...ntact-form.html

  1. <?PHP
  2. /*
  3.   Contact Form from HTML Form Guide
  4.   This program is free software published under the
  5.   terms of the GNU Lesser General Public License.
  6.   See this page for more info:
  7. */
  8. require_once("./include/fgcontactform.php");
  9. require_once("./include/captcha-creator.php");
  10.  
  11. $formproc = new FGContactForm();
  12. $captcha = new FGCaptchaCreator('scaptcha');
  13.  
  14. $formproc->EnableCaptcha($captcha);
  15.  
  16. //1. Add your email address here.
  17. //You can add more than one receipients.
  18. $formproc->AddRecipient('tests@html-form-guide.com'); //<<---Put your email address here
  19.  
  20.  
  21. //2. For better security. Get a random tring from this link: http://tinyurl.com/randstr
  22. // and put it here
  23. $formproc->SetFormRandomKey('XsHVufPpgD9Epwl');
  24.  
  25. $formproc->AddFileUploadField('photo','jpg,jpeg,gif,png,bmp',2024);
  26. $formproc->AddFileUploadField('resume','doc,docx,pdf,txt',2024);
  27.  
  28. if(isset($_POST['submitted']))
  29. {
  30. if($formproc->ProcessForm())
  31. {
  32. $formproc->RedirectToURL("thank-you.php");
  33. }
  34. }
  35.  
  36. ?>
  37. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  38. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
  39. <head>
  40. <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
  41. <title>Contact us</title>
  42. <link rel="STYLESHEET" type="text/css" href="contact.css" />
  43. <script type='text/javascript' src='scripts/gen_validatorv31.js'></script>
  44. <script type='text/javascript' src='scripts/fg_captcha_validator.js'></script>
  45. </head>
  46. <body>
  47.  
  48. <!-- Form Code Start -->
  49. <form id='contactus' action='<?php echo $formproc->GetSelfScript(); ?>' method='post' enctype="multipart/form-data" accept-charset='UTF-8'>
  50.  
  51. <fieldset >
  52. <legend>Contact us</legend>
  53.  
  54. <input type='hidden' name='submitted' id='submitted' value='1'/>
  55. <input type='hidden' name='<?php echo $formproc->GetFormIDInputName(); ?>' value='<?php echo $formproc->GetFormIDInputValue(); ?>'/>
  56. <input type='text' class='spmhidip' name='<?php echo $formproc->GetSpamTrapInputName(); ?>' />
  57.  
  58. <div class='short_explanation'>* required fields</div>
  59.  
  60. <div><span class='error'><?php echo $formproc->GetErrorMessage(); ?></span></div>
  61. <div class='container'>
  62. <label for='name' >Your Full Name*: </label><br/>
  63. <input type='text' name='name' id='name' value='<?php echo $formproc->SafeDisplay('name') ?>' maxlength="50" /><br/>
  64. <span id='contactus_name_errorloc' class='error'></span>
  65. </div>
  66. <div class='container'>
  67. <label for='email' >Email Address*:</label><br/>
  68. <input type='text' name='email' id='email' value='<?php echo $formproc->SafeDisplay('email') ?>' maxlength="50" /><br/>
  69. <span id='contactus_email_errorloc' class='error'></span>
  70. </div>
  71. <div class='container'>
  72. <label for='message' >Message:</label><br/>
  73. <span id='contactus_message_errorloc' class='error'></span>
  74. <textarea rows="10" cols="50" name='message' id='message'><?php echo $formproc->SafeDisplay('message') ?></textarea>
  75. </div>
  76. <div class='container'>
  77. <label for='photo' >Your photo:</label><br/>
  78. <input type="file" name='photo' id='photo' /><br/>
  79. <span id='contactus_photo_errorloc' class='error'></span>
  80. </div>
  81. <div class='container'>
  82. <label for='photo' >Resume:</label><br/>
  83. <input type="file" name='resume' id='resume' /><br/>
  84. <span id='contactus_resume_errorloc' class='error'></span>
  85. </div>
  86. <div class='container'>
  87. <div><img alt='Captcha image' src='show-captcha.php?rand=1' id='scaptcha_img' /></div>
  88. <label for='scaptcha' >Enter the code above here:</label>
  89. <input type='text' name='scaptcha' id='scaptcha' maxlength="10" /><br/>
  90. <span id='contactus_scaptcha_errorloc' class='error'></span>
  91. <div class='short_explanation'>Can't read the image?
  92. <a href='java script: refresh_captcha_img();'>Click here to refresh</a>.</div>
  93. </div>
  94.  
  95.  
  96. <div class='container'>
  97. <input type='submit' name='Submit' value='Submit' />
  98. </div>
  99.  
  100. </fieldset>
  101. </form>
  102. <!-- client-side Form Validations:
  103. Uses the excellent form validation script from JavaScript-coder.com-->
  104.  
  105. <script type='text/javascript'>
  106. // <![CDATA[
  107.  
  108. var frmvalidator = new Validator("contactus");
  109. frmvalidator.EnableOnPageErrorDisplay();
  110. frmvalidator.EnableMsgsTogether();
  111. frmvalidator.addValidation("name","req","Please provide your name");
  112.  
  113. frmvalidator.addValidation("email","req","Please provide your email address");
  114.  
  115. frmvalidator.addValidation("email","email","Please provide a valid email address");
  116.  
  117. frmvalidator.addValidation("message","maxlen=2048","The message is too long!(more than 2KB!)");
  118.  
  119. frmvalidator.addValidation("photo","file_extn=jpg;jpeg;gif;png;bmp","Upload images only. Supported file types are: jpg,gif,png,bmp");
  120.  
  121. frmvalidator.addValidation("scaptcha","req","Please enter the code in the image above");
  122.  
  123. document.forms['contactus'].scaptcha.validator
  124. = new FG_CaptchaValidator(document.forms['contactus'].scaptcha,
  125. document.images['scaptcha_img']);
  126.  
  127. function SCaptcha_Validate()
  128. {
  129. return document.forms['contactus'].scaptcha.validator.validate();
  130. }
  131.  
  132. frmvalidator.setAddnlValidationFunction("SCaptcha_Validate");
  133.  
  134. function refresh_captcha_img()
  135. {
  136. var img = document.images['scaptcha_img'];
  137. img.src = img.src.substring(0,img.src.lastIndexOf("?")) + "?rand="+Math.random()*1000;
  138. }
  139.  
  140. // ]]>
  141. </script>
  142.  
  143.  
  144. </body>
  145. </html>
  146.  


Ten post edytował Kamalo89 27.09.2013, 19:42:19
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 29.06.2025 - 03:09