Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Dynamic HTML Editor
 Dynamic HTML Editor
 PHP Send Mail Forms
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Andy
Expert

United Kingdom
83 Posts

Posted - 09 Dec 2010 :  09:36:55  Show Profile  Visit Andy's Homepage  Reply with Quote
Hi,

I have had some problems getting my head around PHP Forms, but managed to sort it out (mainly) and thought would share it. When you set up your form its best to plan it on paper first what fields you want. Then create the labels first, and then the FIELDS in the SAME ORDER. That way you ensure the fields are sent in that same order to the email recipient. If you move the fields around it mucks the order up, and the best thing then is to delete your form and start again. Dont bother copying fields and pasting, that just makes the whole form confused and it wont work!

With my small level of knowledge, I could only format the email by using ******** in the Form Validation Value field to align the option output up so it is a bit easier for the recipient to read ie

Date ****10/12/2010
Place ***London

I also found a problem with Form Field Validation, regular expression for Digits only. That didnt work What does work is /^[0-9]{11}/ where the first bit says accept numbers 0 to 9 and the curly brackets says 11 spaces (for a phone number)

A UK PostCode one is a bit beyond me at the moment, but am enjoying trying ! This is the form I came up with http://www.equi-toothcare.co.uk/BookingForm.php

Andy

s.dav
Site Admin

Italy
3364 Posts

Posted - 09 Dec 2010 :  09:56:59  Show Profile  Visit s.dav's Homepage  Reply with Quote
You can arrange the fields order by setting the "tabindex" property; you don't need to delete then re-create your form!

Regards, Davide
Go to Top of Page

Andy
Expert

United Kingdom
83 Posts

Posted - 09 Dec 2010 :  17:41:58  Show Profile  Visit Andy's Homepage  Reply with Quote
I tried that and it did not work. It will tab correctly in DHE , but the mail output was still the order created in. Eventually as I had tried quite a lot of things, it wouldnt work at all and send anything. I clearly got it confused. As I say, for me the solution was to recreate it in the proper order....the message was to me, to plan my work better :-)

Andy
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 10 Dec 2010 :  13:42:14  Show Profile  Visit s.dav's Homepage  Reply with Quote
Andy,

you are right; the "TabIndex" property serves only to permit people to go through fields in a correct order;
in the email you'll receive fields in the order you see them in the "Object List" window. You can change that order by moving fields with "Send Backward" or "Bring Forward" buttons

Regards, Davide
Go to Top of Page

Martin1
Super User

Netherlands
626 Posts

Posted - 10 Dec 2010 :  15:30:39  Show Profile  Reply with Quote
I give on my blog several email forms and the accompanying scripts and even a tell-a-friend form away. You can download them for free and use them for personal and commercial purposes you are just NOT allowed to redistribute them.

Go here for the tell-a-friend form with captcha protection:
http://www.albruna.nl/albrunablog/2010/12/gratis-tell-a-friendformulier/

Go here for a mailform with captcha protection and mandatory fields:
http://www.albruna.nl/albrunablog/2010/04/nog-een-gratis-html-en-php-contactformulier-2/

Go here for three different mailforms (last one also has captcha protection):
http://www.albruna.nl/albrunablog/2009/09/update-3-gratis-html-en-php-contactformulieren/

Enjoy!



Go to Top of Page

Andy
Expert

United Kingdom
83 Posts

Posted - 10 Dec 2010 :  16:54:45  Show Profile  Visit Andy's Homepage  Reply with Quote
Dav,

so how do you stop the text from the submit and reset button appearing on the output email please?

Andy
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 15 Dec 2010 :  10:02:10  Show Profile  Visit s.dav's Homepage  Reply with Quote
I didn't understand your question; can you explain me the problem better?

Regards, Davide
Go to Top of Page

candid
Expert

South Africa
53 Posts

Posted - 15 Dec 2010 :  11:18:54  Show Profile  Visit candid's Homepage  Reply with Quote
Andy,

are you saying, that the submit and reset button text is being sent to you from the form ?, I tested your form it seems to work OK, but obviously don't know what you get in your inbox.

George
Go to Top of Page

Andy
Expert

United Kingdom
83 Posts

Posted - 15 Dec 2010 :  17:52:33  Show Profile  Visit Andy's Homepage  Reply with Quote
Candid, Yes. The text from the uttons is sent in the email, which just clutters it up.

Andy
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 16 Dec 2010 :  10:15:35  Show Profile  Visit s.dav's Homepage  Reply with Quote
Yes, the text of buttons is reported in the email; why don't you want this text?

Regards, Davide
Go to Top of Page

Andy
Expert

United Kingdom
83 Posts

Posted - 16 Dec 2010 :  11:16:55  Show Profile  Visit Andy's Homepage  Reply with Quote
Hi Dav,

You only want the email to contain relevant text, so that its clear and easy for the person receiving it reads it properly and doesnt lose a customer. It would be a lot better still if the format of the input text on the email was different. That would again make it easier to read and things wouldnt get "lost" in the text.

Andy
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 17 Dec 2010 :  09:22:27  Show Profile  Visit s.dav's Homepage  Reply with Quote
Ok I'll think something for the next version

Regards, Davide
Go to Top of Page

Andy
Expert

United Kingdom
83 Posts

Posted - 17 Dec 2010 :  16:31:14  Show Profile  Visit Andy's Homepage  Reply with Quote
Thanks

Andy
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000