Formy | Easy contact form

How to use

Working with this file requires you have at least some basic knowledge of html,php and javascript

  1. The basic files Formy needs to work are the send-mail.php, js/formy.js and the css/formy.css so don't forget to include them in your forlder project.
  2. Copy all the block code from this file (index.html) wrapped inside the tags:
    <!-- formy --> code not shown <!-- ENDS formy -->
  3. Configure the sending data at the end of the form:
    					
    <!-- send mail configuration -->
    <input type="hidden" value="luis@luiszuno.com" name="to" id="to" />
    <input type="hidden" value="From contact form" name="subject" id="subject" />
    <input type="hidden" value="send-mail.php" name="sendMailUrl" id="sendMailUrl" />
    <!-- ENDS send mail configuration -->
    					
  4. To add more fields:
    1- Add the field to the form.
    2- Add the validation at the js/formy.js file.
    Adding the variable after the form field name. Then add the variable to the "datastring" under the // Create the data string comment.
    i.e.
    var new_field = $("#new_field").val();
    Then add it to the datastrong
    var dataString = 'name='+ name + '&new_field=' + new_field ... 
    3- Add the variable to the send-mail.php
    i.e.
    $msg .= "NEW FIELD: "  .$_POST['field_name'] ; 
  5. Please feel free to use the discussion form page for this file to share your thoughts and questions.