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.
Page 1 of 2 12 LastLast
Results 1 to 15 of 29
  1. #1
    Regular Coder
    Join Date
    Nov 2010
    Posts
    295
    Thanks
    105
    Thanked 0 Times in 0 Posts

    Need help with website form?

    Hey guys, I am new here, I have studied XHTML and CSS and will be studying JS next but I am now finishing up my very first site but need a script for a regular "form", can anyone tell me where i might be able to get such a script for free if possible please? The form in question is a simple "Mailing List" form with 6 entries, any help/links/leads will be appreciated.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    Why do you need a script for that? Just a <form> with CSS is all you need.

    No scripting needed.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    Regular Coder
    Join Date
    Nov 2010
    Posts
    295
    Thanks
    105
    Thanked 0 Times in 0 Posts
    I have never used or coded a script before, I am designing a site for someone and this is my very first site so I don't know what is needed to make the form work and searching the net for help I am coming across "Scripting" as the method to making the forms work which is why I went in search of a scripting forum which brought me here.

    If I understand you correctly that all I need is CSS coding to make this form work then I will do some more research on the net for this, thanks.

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    It depends on what you want to *DO* with the <form>.

    If you want to store the answers in a database, you must do that by posting the <form> to server-side processing: PHP or ASP or JSP or whatever.

    Even if you just want to email the form contents to somebody, you really can't do that with a script. Yes, it will work for *SOME* people with *SOME* browsers and *SOME* email clients. (The most typical example being MS Internet Explorer used with MS Outlook or Outlook Express.) But your chances of having it work with more than a third to half of all random users is negligible. So you need to submit the <form> to, again, server side processing.

    NOW...

    What you *might* want to do is use JavaScript to validate the <form> contents: Make sure the person answered all the questions, etc. But what do you do if the user has turned off JavaScript in his/her browser (yes, there still are a lot of paranoid users who do that)?? Kablooey.

    So any "validation" you do with JS needs to be re-done with the server-side processing, in any case.

    And, finally, do you want to have a "CAPTCHA" question? (That's where you show an image with a word in it and the user must type in the word...it's to prevent robots from spamming your site, of course.) You must do *that* with server-side code, as well.

    In short, you can use JavaScript to enhance the user experience. You can't use it as a substitute for *good* forms processing.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • Users who have thanked Old Pedant for this post:

    mikehende (11-10-2010)

  • #5
    Regular Coder
    Join Date
    Nov 2010
    Posts
    295
    Thanks
    105
    Thanked 0 Times in 0 Posts
    Well, I haven't covered most of what you're saying yet but tell me this please, I need to have the form's info when filled out to go to the site's owner so she can reply to the person filling out the form, what's the easiest thing I can do to make this work?

  • #6
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    <shrug>Probably just email the form contents to her. Otherwise, she'd have to come to some web page and login to read the messages.

    But it depends on how many such forms will be sent to her each day. A handful? Email.
    7,321 per day? Ummm...I don't think email is such a hot idea. <grin/>

    But as I said, any such solution really needs to be done via server-side coding: PHP, ASP, JSP, etc. Which to use? Depends on what kind of server is hosting her web site.

    *MOST* ISP's will provide you with a ready-to-use form mailer. Meaning that all you have to do is write
    Code:
    <form action="formMailer.php" method="post">
    (or whatever the URL they give you for the mailer is!)

    But beware: Such simple mailers can't be expected to do form validation, let alone handling CAPTCHA if spamming is an issue.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #7
    Regular Coder
    Join Date
    Nov 2010
    Posts
    295
    Thanks
    105
    Thanked 0 Times in 0 Posts
    The Hosting is with Godaddy.com, what is it I can ask them concerning this form issue please to know what can be done here for the site's owner to receive the info from the form on her page?

  • #8
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    Okay...which kind of hosting? Windows or Linux?

    On Windows, I know they give you a form mailer. I *think* they do so on Linux as well.

    I'm pretty sure you can find the answer in their FAQs, by the by.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #9
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    http://community.godaddy.com/?s=form+mailer

    Yep. And instructions for how to use are linked to from that page.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #10
    Regular Coder
    Join Date
    Nov 2010
    Posts
    295
    Thanks
    105
    Thanked 0 Times in 0 Posts
    Yes, I am holding for them on the phone right now to find out in detail how all of this works.

  • #11
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    Honest, the info on the web site is better than you are likely to get on the phone.

    And/or look in their forums.

    The only thing you need to know is if the site is hosted on windows or linux.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #12
    Regular Coder
    Join Date
    Nov 2010
    Posts
    295
    Thanks
    105
    Thanked 0 Times in 0 Posts
    The site is Hosted on Linux. They said I can use either the CGI-Mailer form or Php mailer form, which would be bets here please?

  • #13
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    Just looking at the stuff online, it looks like the PHP version is more flexible. Notice that there are *TWO* PHP mailers.

    If it's available to you, use webformmailer.php

    http://community.godaddy.com/help/article/510
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #14
    Regular Coder
    Join Date
    Nov 2010
    Posts
    295
    Thanks
    105
    Thanked 0 Times in 0 Posts
    Ok, I will look into all of this in more detail tomorrow and report back here, thank you very much for the help!

  • #15
    Regular Coder
    Join Date
    Nov 2010
    Posts
    295
    Thanks
    105
    Thanked 0 Times in 0 Posts
    I am seeing their instructions but I need to ask these questions to learn what I am doing instead of anyone simply telling me what to do so please excuse the questions below and I would appreciate any answers:

    On my Index.html file do I have to:

    1] Change the existing first line's "Form Action" from :

    <form action="http://www.funkadelic.com/contest.php" method="post">

    to what they have which is:

    <form action="/gdform.php" method="post">

    If yes, then why please?

    2] If you look at their form entries:

    <p>First Name:<input type="text" name="FirstName" /></p>

    when mine shows:

    <input type="text" name="firstname" value="" />

    Their coding look different, can you explain why please or are they both the same thing or is theirs better than mine?

    3] Should I include these 2 entries in my form html?

    <input type="hidden" name="subject" value="Form Submission" />
    <input type="hidden" name="redirect" value="thankyou.html" />

    BTW, this is my entire form coding in my Index.html page:

    <form action="http://www.funkadelic.com/contest.php" method="post">
    <p>SIGN UP FOR OUR MAILING<br/>
    LIST TO RECEIVE DISCOUNT
    OFFERS!!</p>

    <table id="signUpForm">

    <tr>
    <td>First Name:</td>
    <td>
    <input type="text" name="firstname" value="" />
    </td>
    </tr>
    <tr>
    <td>Last Name:</td>
    <td>
    <input type="text" name="lastname" value="" />
    </td>
    </tr>
    <tr>
    <td>Band Name:</td>
    <td>
    <input type="text" name="bandname" value="" />
    </td>
    </tr>
    <tr>
    <td>Music Genre:</td>
    <td>
    <input type="text" name="musicgenre" value="" />
    </td>
    </tr>
    <tr>
    <td>Phone: </td>
    <td>
    <input type="text" name="phone" value="" />
    </td>
    </tr>
    <tr>
    <td>Email: </td>
    <td>
    <input type="text" name="email" value="" />
    </td>
    </tr>
    <tr>
    <th></th>
    <td>
    <input type="submit" value="Submit" />
    </td>
    </tr>
    </table>


    </form>


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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