Thanks. Just one more thing. I am adding the form in a custom page, so its limited to HTML & JS only. I don't think its possible to use PHP in custom page. Is there any work around for this.
Basically I am creating a form to collect certain information from the visitor. The form is processed using a custom developed PHP code.