Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Script to submit a form via email

  1. #1
    Join Date
    May 2007
    Location
    South Africa
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Script to submit a form via email

    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

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Try this.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  3. #3
    Join Date
    May 2007
    Location
    South Africa
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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

  4. #4
    Join Date
    May 2007
    Location
    South Africa
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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

  5. #5
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Quote Originally Posted by Rob (SA) View Post
    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.

  6. #6
    Join Date
    May 2007
    Location
    South Africa
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Thumbs up

    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

  7. #7
    Join Date
    May 2007
    Location
    South Africa
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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
    Last edited by Rob (SA); 01-09-2008 at 02:37 PM.

  8. #8
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Quote Originally Posted by Rob (SA) View Post
    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


    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.

  9. #9
    Join Date
    May 2007
    Location
    South Africa
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Thumbs up

    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

  10. #10
    Join Date
    Oct 2007
    Posts
    43
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •