Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Very good contact form for free

    Very good website contact form for free.

    Hello, I try to build an advanced contact form out of two cost free contact forms. I created already an index.html file, which contains both contact forms, but only the lower contact form works correctly. If the email address is inserted in the php-part of the html-file (the provider must support php), can be sent already emails over an internet site with attached files. However the good contact form is the upper contact form, which is only an unlinked form until now, which not can be used to send emails. Thus the design of the upper contact form must be transferred onto the lower contact form or the function of the lower contact form must be transferred onto the upper contact form. Does contingent anyone know, how it can be realized to enable the function of the upper contact form through the editing of the index file? It is would be good if anywhere is available a good contact form with file upload for free, I have searched a whole day long to find them. Who would not prefer to use a contact form with file upload for his webpage than a form without.

    I have uploaded all files as compressed zip-file to a provider, where it can be downloaded through the following link:
    http://www.wikiupload.com/2P2MK7BEZ5S1DYW
    or
    http://www.2shared.com/file/sqqYFiCh/files.html
    or
    http://www.filedropper.com/files_3

    The decompressed files can be uploaded directly to the webspace, through the opening of the index file the contact forms can be shown.

    The code of the index-file, which must be edited:
    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
      <meta content="text/html; charset=ISO-8859-1"
     http-equiv="content-type">
      <title>Contact Form</title>

    <!-- Style of the first contact form  -->

    <style>
    *{ margin:0; padding:0;}
    body{ font:100% normal Arial, Helvetica, sans-serif; background:#ffffffff;}
    form,input,select,textarea{margin:0; padding:0; color:#fff;}

    div.box{
    margin:0 auto;
    width:500px;
    background:#222;
    position:relative;
    top:50px;
    border:1px solid #262626;
    }

    div.box h1{ 
    color:#FFF5CC;
    font-size:18px;
    text-transform:uppercase;
    padding:5px 0 5px 5px;
    border-bottom:1px solid #161712;
    border-top:1px solid #161712; 
    }

    div.box label{
    width:100%;
    display: block;
    background:#1C1C1C;
    border-top:1px solid #262626;
    border-bottom:1px solid #161712;
    padding:10px 0 10px 0;
    }
    div.box label span{
    display: block;
    color:#bbb;
    font-size:12px;
    float:left;
    width:100px;
    text-align:right;
    padding:5px 20px 0 0;
    }

    div.box .input_text{
    padding:10px 10px;
    width:200px;
    background:#262626;
    border-bottom: 1px double #171717;
    border-top: 1px double #171717;
    border-left:1px double #333;
    border-right:1px double #333;
    }

    div.box .message{
    padding:7px 7px;
    width:350px;
    background:#262626;
    border-bottom: 1px double #171717;
    border-top: 1px double #171717;
    border-left:1px double #333;
    border-right:1px double #333;
    overflow:hidden;
    height:150px;
    }

    div.box .button
    {
    margin:0 0 10px 0;
    padding:4px 7px;
    background:#CC0000;
    border:0px;
    position: relative;
    top:10px;
    left:382px;
    width:100px;
    border-bottom: 1px double #660000;
    border-top: 1px double #660000;
    border-left:1px double #FF0033;
    border-right:1px double #FF0033;
    }
    </style>

    </head>
    <body>

    <!-- First contact form  -->

         <form action="./" method="post">
              <div class="box">
                <h1>Contact Form</h1>
                <label>
                   <span>Full name *</span>
                   <input type="text" class="input_text" name="name" id="name"/>
                </label>
                 <label>
                   <span>Email *</span>
                   <input type="text" class="input_text" name="email" id="email"/>
                </label>
                 <label>
                    <span>Subject *</span>
                    <input type="text" class="input_text" name="subject" id="subject"/>
                </label>
                <label>
                    <span>Message *</span>
                    <textarea class="message" name="feedback" id="feedback"></textarea>
                     <input type="submit" class="button" value="SUBMIT" />
                </label>
                 <label>
                    <span>Upload File: *</span>
                    <input type="file" class="uploaded_file" name="uploaded_file" id="uploaded_file"/
                </label>
            </div>
        </form>

    <!-- PHP skript of the second contact form: insert email -->

    <?PHP

    require_once("./include/fgcontactform.php");

    $formproc = new FGContactForm();

    $formproc->AddRecipient('insert@email.com'); //<<---Put your email address here


    //2. For better security. Get a random tring from this link: [url]http://tinyurl.com/randstr[/url]
    // and put it here
    $formproc->SetFormRandomKey('HG9hPBpn9Bn26yg');

    $formproc->AddFileUploadField('photo','jpg,jpeg,gif,png,bmp,pdf,doc,odt,txt',2024);

    if(isset(
    $_POST['submitted']))
    {
       if(
    $formproc->ProcessForm())
       {
            
    $formproc->RedirectToURL("thank-you.php");
       }
    }

    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
    <head>
          <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
          <title>Contact us</title>
          <link rel="STYLESHEET" type="text/css" href="contact.css" />
          <script type='text/javascript' src='scripts/gen_validatorv31.js'></script>
          <script type='text/javascript' src='scripts/fg_captcha_validator.js'></script>
    </head>
    <body>

    <!-- Second contact form -->

    <!-- Form Code Start -->
    <form id='contactus' action='<?php echo $formproc->GetSelfScript(); ?>' method='post' enctype="multipart/form-data" accept-charset='UTF-8'>

    <fieldset >
    <legend>Contact us</legend>

    <input type='hidden' name='submitted' id='submitted' value='1'/>
    <input type='hidden' name='<?php echo $formproc->GetFormIDInputName(); ?>' value='<?php echo $formproc->GetFormIDInputValue(); ?>'/>
    <input type='text'  class='spmhidip' name='<?php echo $formproc->GetSpamTrapInputName(); ?>' />

    <div class='short_explanation'>* required fields</div>

    <div><span class='error'><?php echo $formproc->GetErrorMessage(); ?></span></div>
    <div class='container'>
        <label for='name' >Your Full Name*: </label><br/>
        <input type='text' name='name' id='name' value='<?php echo $formproc->SafeDisplay('name'?>' maxlength="50" /><br/>
        <span id='contactus_name_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='email' >Email Address*:</label><br/>
        <input type='text' name='email' id='email' value='<?php echo $formproc->SafeDisplay('email'?>' maxlength="50" /><br/>
        <span id='contactus_email_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='message' >Message:</label><br/>
        <span id='contactus_message_errorloc' class='error'></span>
        <textarea rows="10" cols="50" name='message' id='message'><?php echo $formproc->SafeDisplay('message'?></textarea>
    </div>
    <div class='container'>
        <label for='photo' >Upload your photo:</label><br/>
        <input type="file" name='photo' id='photo' /><br/>
        <span id='contactus_photo_errorloc' class='error'></span>
    </div>


    <div class='container'>
        <input type='submit' name='Submit' value='Submit' />
    </div>

    </fieldset>
    </form>
    <!-- client-side Form Validations:
    Uses the excellent form validation script from JavaScript-coder.com-->

    <script type='text/javascript'>
    // <![CDATA[

        var frmvalidator  = new Validator("contactus");
        frmvalidator.EnableOnPageErrorDisplay();
        frmvalidator.EnableMsgsTogether();
        frmvalidator.addValidation("name","req","Please provide your name");

        frmvalidator.addValidation("email","req","Please provide your email address");

        frmvalidator.addValidation("email","email","Please provide a valid email address");

        frmvalidator.addValidation("message","maxlen=2048","The message is too long!(more than 2KB!)");

        frmvalidator.addValidation("photo","file_extn=jpg;jpeg;gif;png;bmp","Upload images only. Supported file types are: jpg,gif,png,bmp");
    // ]]>
    </script>
    </body>
    </html>
    Last edited by VIPStephan; 08-08-2012 at 12:34 AM. Reason: added code BB tags

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,624
    Thanks
    6
    Thanked 1,001 Times in 974 Posts
    In future, if you post any code please put it in between [CODE][/CODE] tags. It makes scanning your posts much easier. You can do this by clicking the small ‘#’ icon above the reply field.

  • #3
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No problem!


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •