Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Forms with arrays

    Hello,
    I use a form that has several list fields, and the selections are populated through arrays.

    Is it correct to assume that in order to have the users responses posted back to me, I need to have a database folder in the root or housed with the server?

    If so, is there some way of coding the select fields to avoid this?

    Thanks for any help.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    The Planet Earth Code Poet: True
    Posts
    282
    Thanks
    0
    Thanked 1 Time in 1 Post
    As this is the client-side JavaScript forum I will give you the client-side Javascript answer. It is possible to have the form submitted to you using client-side javascript and email. When the form is submitted it sends an email to you with the form data. Often times a popup will warn the user that the information is being submitted by email.

    If you do not want to have the info emailed to you in this manner you will have to use a server-side language.

  • #3
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello John,

    I'd be happy to have the form submitted an posted back to me in the manner you mentioned. Are there any tutorials that you know of that would show me how to accomplish having the users choices from select lists that are populated through arrays posted back to me?

    Thanks for your response.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    The Planet Earth Code Poet: True
    Posts
    282
    Thanks
    0
    Thanked 1 Time in 1 Post
    Sure, the key is to set up your form tag correctly:

    <form method="post" action="mailto:xxx@xxx.xxx" enctype="text/plain">

    Of course you would replace all the xxx stuff with the email address you would like to send to. Upon subbmission, the data that was entered into the form and seleceted by the user will be emailed to you.

    For a full blown tutorial see:

    http://developer.netscape.com:80/vie...to/mailto.html

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dang, he beat me to it. I always recommend that tutorial.

    P.S. They also have an example javascript formatting method at the bottom of that page; however there IS a problem with that method though regarding Microsoft Outlook/Outlook Express that I ran into if the script or message gets to be too long...

    Anyway post back if you run into any problems. If you do, you might find it easier to just post the whole email as John Krutsch suggested:

    action="mailto:who@what.com" enctype="text/plain"

    in the form tag, instead of the javascript route they have as an example. It's uglier, but it gets the job done.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

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