“Desgin to HTML Application Form” Documentation by “Stefan Petrov” v1.0


“Desgin to HTML Application Form”

Created: 22/06/2011
By: Stefan Petrov
Email: me@stefanpetrov.net


Table of Contents

  1. Preamble
  2. Requirements
  3. Features
  4. Installation & Configuration
  5. Package
  6. PHP Code Explanation
  7. JavaScript Code Explanation

A) Preamble - top

Design-HTML Application Form is a simple standalone highly customizable application form powered by xHTML, PHP and jQuery. It will help you to make it easer for your clients to reach you and send the design for slicing via your site. In config you can set package for slicing, options and extras, prices, days needed, discounts and more. All this can be done with simple text editor in well documented config.php file. Form is a spam protected with google reCaptcha. In order to use it you need to obtain a private and public keys from google with you google account.

If you wish to use google's recaptcha you can get key's from here https://www.google.com/recaptcha/admin/create


B) Requirements - top

All you need to run the form is ordinary web server with PHP4 and Javascript enabled browser. You can embed it into your website just by copy/paste file structure in separate folder. In lib/config.php you can set redirect after successfully submission.


C) Features - top


D) Installation & Configuration - top


E) Package - top

I've used the following images, icons or other files as listed.


E) PHP Code Explanation - top

Generation of the HTML depends on packages, options and extras arrays. Packages are mandatory while options and extras are optional. Schema of these arrays is name as string, price as integer and days as integer. Name is used to display to user, price is used for calculation of the final price, days are used for calculation of the needed time.

At the end of the /lib/functions.php you will find script that sanitizes the posted variables. I recommend do not using variables directly from $_POST array.

Functions


E) JavaScript Code Explanation - top

Forms uses jQuery library. It is easy to use and customize. Main JavaScript file is /lib/js.js. Themming of radios and checkboxes is done with css class and small JS code.

Functions


Stefan Petrov

Go To Table of Contents