Log in

View Full Version : Script to submit a form via email



Rob (SA)
01-09-2008, 09:22 AM
Hi Folks,

This has proably been done 1000x before.

I have a page which can be veiwed at http://www.gnjgf.co.za/domtour.php

I would like the entrants to complete the inputs and then by using a submit button the page as you see it in its completed form be received by me?

It sound scomplicated and maybe it is.

I would value your input and advice

Kind Regards
Rob

tech_support
01-09-2008, 09:42 AM
Try this (http://www.dynamicdrive.com/forums/showthread.php?t=23295#14).

Rob (SA)
01-09-2008, 10:30 AM
Hi,

Thanks for the speedy reply.

In going to you link - do I copy what is there and put it into a certain section of my page?

Sorry it sounds like a dumb question but I have no php or html skill that is worth mention.

Kind Regards
Rob

Rob (SA)
01-09-2008, 11:27 AM
Hi,

I have posted that script to my page and I see the effect in that spaces are created to receive inputs and then using the submit button it is submitted.

My request is a little different.

whilst I would like to keep the inputs the same I would like to see all the images, frames and full layout of the entry form in the email when it is received from submission.

I hope that makes sense

Kind Regards
Rob

boogyman
01-09-2008, 01:19 PM
whilst I would like to keep the inputs the same I would like to see all the images, frames and full layout of the entry form in the email when it is received from submission.

In the $message or $body or whatever you call that third parameter of the email you would put the same html elements, but instead of input fields, you would use the fields the user selected...

I would suggest against this though, and just use a regular text email... you can still get all of the same information but without all the excess junk you do in the form.

Rob (SA)
01-09-2008, 02:14 PM
Hi,

Thank you for the reply.

The tidyness of my form / page is most likely not what the experianced coder would relish however it does currently serve the purpose.

Refering to the "junk" are you of the opinion that I can structure my page to give the same result that could make for quicker loading and also give me a result originally requested? That is to receive a form that is seen in html with all the inputs attached to it.

Thank you for being frank and open - I appreciate your input

Kind Regards
Rob

Rob (SA)
01-09-2008, 02:31 PM
Hi Folks,

Here are some other thoughts that could work.

Using the form as is, a script could perhaps be written that on printing the page the choice is given by the user to print to a printer or print to a file.

The file name having the name and surname of the entrant.

This file could then be attached and sent via email.

On recieipt of the file there could be an option on this end on opening to veiw / print or do both to the file.

It seesm so easy to write but not knowing a thing about php /html and scripts it could be looking for the impossible.

I look forward to your contact

Kind Regards
ROb

boogyman
01-09-2008, 02:59 PM
Hi,

Thank you for the reply.

The tidyness of my form / page is most likely not what the experianced coder would relish however it does currently serve the purpose.

Refering to the "junk" are you of the opinion that I can structure my page to give the same result that could make for quicker loading and also give me a result originally requested? That is to receive a form that is seen in html with all the inputs attached to it.

Thank you for being frank and open - I appreciate your input

Kind Regards
Rob

I wasn't talking about your "coding technique" at all. I was actually talking about the dual columns. They are unnecessary in an email.
As for being blunt, I believe in honesty; you may not like what I have to say, but it will be the my truthful opinion. Please do not take something I say offensive, because opinions are very subjective :p




Using the form as is, a script could perhaps be written that on printing the page the choice is given by the user to print to a printer or print to a file.
The file name having the name and surname of the entrant.
This file could then be attached and sent via email.
On recieipt of the file there could be an option on this end on opening to veiw / print or do both to the file.
It seesm so easy to write but not knowing a thing about php /html and scripts it could be looking for the impossible.

While the email being sent to you doesn't need to be in html format, you should offer a template after the email has been sent to print the registration, similar to the registration form. as for saving it to a MS Word or other type of document is beyond my capabilities as well, however, what you could do is save the information to a database and using a default template just populate the information from the form into the template as necessary which someone could choose to print.

Rob (SA)
01-09-2008, 03:11 PM
Hi,

No offense taken - I prefer the honest direct approach.

The page is set to have a print option as currently the page is printed then signed and then faxed back to me - the registration on receipt of payemnt then complete.

The idea of sending to inputs to a data base is of merit and is under consideration to reduce the amount of administration required by the various volinteers.

Populating the database to a template is a possibility that I would have to do more research on. I am setting this whole site up for someone to follow and ultimatly that person wont have computer knowledge other than what I will have time to teach. Simplicity thus the key at all times.

Offering a template to be printed again is an option once the mail has been sent.

In all these aspects one needs guidance - my apologies if my requests are numerous for this forum but hopefully with folk like yourself I will be able to get to a suitable point of acceptance.

Kind Regards
Rob

marynorn
01-10-2008, 12:16 PM
When I have a form that has to be submitted in the same format as a written form, I use interactive PDF forms, rather than html forms. They can either be filled in and e-mailed back to you, or printed out and snail-mailed. This produces forms that are visually consistent no matter which method is used, and as the data is returned as xml it is easy to import into a database.

boogyman
01-10-2008, 01:14 PM
When I have a form that has to be submitted in the same format as a written form, I use interactive PDF forms, rather than html forms. They can either be filled in and e-mailed back to you, or printed out and snail-mailed. This produces forms that are visually consistent no matter which method is used, and as the data is returned as xml it is easy to import into a database.

that is a good point, however it requires the user to have a plug-in, being the PDF Viewer.

Rob (SA)
01-10-2008, 03:55 PM
Hi Folks,

These are two very good points.

Please can you direct me as to where I can find or create interactive pdf's?

Secondly what is meant by the user to have a plug-in?

Kind Regard
Rob

marynorn
01-14-2008, 01:02 PM
I use Adobe LiveCycle to create interactive PDFs, but there are cheaper options on the market such as CutePDF.

http://www.cutepdf.com/

I'm not sure if you need more than the most recent version of Reader to fill in the forms, as I always use Acrobat, but you can use the free version of CutePDF, and PDFfiller was also recommended to me.

http://www.cutepdf.com/Products/CutePDF/Filler.asp
http://www.pdffiller.com/

Now that it's been pointed out to me, I realise why I'm getting so many people printing my forms out and sending them back, rather than doing it all on line. I know I get annoyed when I have to download something to do a simple task. :eek: