Not a very big project this, but an opportunity to make $100 (USD) for a couple of hours of work...
- I have a main page called 'index1.html'
- I have a file called 'contact1.html' which contains 'form1' , This file (i.e. contact1.html) is called inside 'index1.html' using 'IFRAME' and is also used independently.
- The elements of 'form1' are:
* fname (textbox), # only aplhabets allowed
* lname (textbox), # only aplhabets allowed
* procedures [multiple select list with options 'knee', 'hip', 'shoulder', 'cancer', 'cardiology'] [size='4'],
* sex (two radio buttons),
* age (textbox), # only numbers allowed
* phone(textbox), # only numbers allowed
* email(textbox), # only valid email ids allowed
* reemail(textbox), # should exactly match email entered by the user
* attach(A button to upload/attach files. The file can be .doc, .pdf, .txt, .jpg, .bmp, .png, .psd)
* A CATCHA IMAGE GENERATED BY A PHP FILE CALLED 'CaptchaSecurityImages.php'
* security_code(textbox), # should exactly match the image generated by 'CaptchaSecurityImages.php'
* send(submit button)
All the fields except 'attach' are REQUIRED and cannot be left blank.
All the fields need to be validated before the form submission can go through.
In case of an error the error needs to be displayed and the input field with error needs to get the focus. Also in case of an error The form needs to hold the values already entered by the user and the data already entered by the user should not be lost. The field with error receives the focus (i.e. gets the cursor). For all incorrect fields the background turns red and a line saying 'invalid input' needs to be displayed in RED under each invalid/incorrect field. For all the correct fields the background turns green and a line in GREEN saying 'input seems to be valid' needs to be displayed under each valid field.
When all the fields are valid ONLY then should the form submission go through AND THE VALUES OF THE FORM NEED TO BE MAILED TO MY EMAIL ID... (along with all the SELECTED values of 'procedures' multiple select List box)... A Success message/Line needs to be displayed at the top of the form... The values of the form need to be RESET...
At NO point in time should the user be redirected to any other page. NO new windows should open. All the validations, submission, error, success messages,etc. need to be displayed while staying at the same page. All scripts to be executed on the same page...
The php file for form validations and mailing to be named 'form1.php'...
Style Sheet for main page 'index.html' is 'style.css'
Style Sheet for 'contact.html' (i.e. the page that contains form1.html) is 'styleframe.css'...