Author |
Topic  |
|
Andy
Expert
  
United Kingdom
83 Posts |
Posted - 09 Dec 2010 : 09:36:55
|
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
|
You can arrange the fields order by setting the "tabindex" property; you don't need to delete then re-create your form! |
Regards, Davide |
 |
|
Andy
Expert
  
United Kingdom
83 Posts |
Posted - 09 Dec 2010 : 17:41:58
|
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 |
 |
|
s.dav
Site Admin
    
Italy
3364 Posts |
Posted - 10 Dec 2010 : 13:42:14
|
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 |
 |
|
Martin1
Super User
    
Netherlands
626 Posts |
|
Andy
Expert
  
United Kingdom
83 Posts |
Posted - 10 Dec 2010 : 16:54:45
|
Dav,
so how do you stop the text from the submit and reset button appearing on the output email please? |
Andy |
 |
|
s.dav
Site Admin
    
Italy
3364 Posts |
Posted - 15 Dec 2010 : 10:02:10
|
I didn't understand your question; can you explain me the problem better? |
Regards, Davide |
 |
|
candid
Expert
  
South Africa
53 Posts |
Posted - 15 Dec 2010 : 11:18:54
|
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 |
 |
|
Andy
Expert
  
United Kingdom
83 Posts |
Posted - 15 Dec 2010 : 17:52:33
|
Candid, Yes. The text from the uttons is sent in the email, which just clutters it up. |
Andy |
 |
|
s.dav
Site Admin
    
Italy
3364 Posts |
Posted - 16 Dec 2010 : 10:15:35
|
Yes, the text of buttons is reported in the email; why don't you want this text? |
Regards, Davide |
 |
|
Andy
Expert
  
United Kingdom
83 Posts |
Posted - 16 Dec 2010 : 11:16:55
|
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 |
 |
|
s.dav
Site Admin
    
Italy
3364 Posts |
Posted - 17 Dec 2010 : 09:22:27
|
Ok I'll think something for the next version
|
Regards, Davide |
 |
|
Andy
Expert
  
United Kingdom
83 Posts |
Posted - 17 Dec 2010 : 16:31:14
|
Thanks |
Andy |
 |
|
|
Topic  |
|