Second Enquiry Form

  griffo 19:44 22 Jan 2009

We have an Enquiry Form on our website (not designed by me/us), which comprises the following files:


Obviously email.php is the script but email.html comprises code only (no design).

We wish to create a second Enquiry Form (to cover different subjects). It would seem logical to try to use most/all of the above files to do this, modifying as necessary.

However, assuming I can modify 'contact' (saving as say, contact_second), how can I re-use the other files to interact with it?

I am using Dreamweaver CS3. I hope someone can help please?

  Kemistri 20:18 22 Jan 2009

" comprises code only (no design)."

That's exactly how it should be: HTML provides content; CSS styles it.

First question tht springs to my mind: are you sure that you need another form? If you do, that's fine, but it's very easy to incorporate more fieldsets and control their display for those who need to use them with a bit of CSS and JS (in such a way that degrades gracefully, of course).

Anyway, can you post a link to contact.html and a brief note of the site structure as it relates to the other files, please? I'd like to take a look at what you're dealing with.

  griffo 22:10 22 Jan 2009

thanks for the response.

click here

that should be the 'work in progress' version of the site. contact-protection.html was my attempt at the second enquiry form but it still has a lot of the features of the original contact.html in it. Although it looks OK in IE7 (not finished though), some attempts at using the form on other PC's has resulted in the emailed form arriving with some fields unpopulated and the titles appearing the same as in 'form 1' (contact.html).

I hope that makes sense?

I know I'm out of my depth here but would like to master it if I can.

  Kemistri 00:03 23 Jan 2009

Yowser! That's bad coding. Whoever built that for you really needs to ditch tables and build more usable forms. If they had, you would be having an easier time of it now.

If you were a bit more familiar with this kind thing, my honest advice to you would have been to scratch at last part of the existing mark up and replace it with some cleaner and valid code that will be fully accessible and far simpler for you to manage in the long run. As it is, I'm not so sure what to suggest. Even trying to add in new fieldsets probably won't be easy for you, I guess. Incidentally, I note that you form doesn't make use of fieldsets, but it really should. That's another thing that's good practice.

The first thing that I do when presented with someone else's form, particularly if it isn't working as they want it to, is to try to break it! By which I mean that I test out its validation to see how good - or bad - it is. Just submitting an empty form made your server wonder what to do indefinitely, whereas it should have told me that something was wrong. This is because it's being run by JavaScript validation instead of PHP validation, which is a pet peeve for me. JS validation was never intended for this use. It's so easy to either break it or bypass it, neither of which is good news for you. JS form validation should be carried out on the fly as an advisory system and never get in the way of submission. click here for instance.

Are you now out of contact with the original developer?

  griffo 08:56 23 Jan 2009

Thanks for looking at it and I'm not surprised at your response. The site was constructed about 8 years ago and the enquiry form was 'donated' to the designers by a third party. I am able to contact him but, as he's in the same line of business as us, it wouldn't be 'proper' to ask for favours.

We understand the need for a complete re-write of our site but we are trying to get most/all of the content we want plus basic functionality in place for the short-term. Then we will put together an up to date new version of the site, using all the content from this one. I hope that makes sense?

In the meantime, would it be feasible to construct a new enquiry form and ditch the existing?

  griffo 14:11 24 Jan 2009

take your points but would rather keep to the present format if possible.

Just need guidance on whether to persist with trying to modify existing, as a 'duplicate/second' form or start over again from scratch.

If the latter - does anyone know a good tutorial I can access please?

  Kemistri 17:18 24 Jan 2009

Yep. click here. Read up to and including page 3, but the rest is optional and may be inadvisable for newbies.

I would post some example mark up and style declarations, but I recall advice from the FE to avoid posting large amounts of code. This site really needs the phpBB-style [code] tags!

  HighTower 13:04 01 Mar 2009

If you've got £23 handy and just want the job done then this is an excellent extension:

click here

They also do a captcha extension which integrates with this email form.

Not quite a substitute to learning how to do it yourself, but a quick fix and a handy extension to have in your toolbox. I guess it's more useful as a time saver (and better value for money) if you regularly put sites together, but you may find it handy.

  griffo 22:10 09 Mar 2009

That could prove very useful - many thanks.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Nokia 8 vs Galaxy S8

How artist Alex Yanes worked with his daughter on this bright 3D mural for Monument Valley 2

iMac 21.5-inch (2017) review

Comment regarder le lancement du Galaxy Note 8 en direct ?