We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message
Contact Forum Editor

Send an email to our Forum Editor:


PLEASE NOTE: Your name is used only to let the Forum Editor know who sent the message. Both your name and email address will not be used for any other purpose.

Tech Helproom


It's free to register, to post a question or to start / join a discussion


 

Second Enquiry Form


griffo

Likes # 0

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

contact.html
email.html
email.php
fail.html
thanks.html

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?

Like this post
Kemistri

Likes # 0

"...email.html 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.

Like this post
griffo

Likes # 0

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.

Like this post
Kemistri

Likes # 0

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?

Like this post
griffo

Likes # 0

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?

Like this post
griffo

Likes # 0

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?

Like this post
Kemistri

Likes # 0

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!

Like this post
HighTower

Likes # 0

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.

Like this post
griffo

Likes # 0

That could prove very useful - many thanks.

Like this post

Reply to this topic

This thread has been locked.



IDG UK Sites

Best Christmas 2014 UK tech deals, Boxing Day 2014 UK tech deals & January sales 2015 UK tech...

IDG UK Sites

LED vs Halogen: Why now could be the right time to invest in LED bulbs

IDG UK Sites

Christmas' best ads: See great festive spots studios have created to promote themselves and clients

IDG UK Sites

Why Apple shouldn't be blamed for exploitation in China and Indonesia