SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Nov 2013
    Location
    cornwall uk
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    adding a comment form

    Hi I am new to this forum and a beginner with Dreamweaver and use CS3. I can do basic things and I'm redesigning pages on our holiday cottage website.
    There is an enquiry form where people can put in info to book a cottage which is sent by email. I want to add a comments box and have managed to do so and it can be filled in but although the original form is sent successfully my comments box does not appear. I've looked to see if there's any difference in the code between the existing text boxes and the one I'm adding and I can't see any.
    Any ideas?
    Thanks for looking
    Netley

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,500
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Hi Netley, welcome to the SP forums.
    Could you please post the part of your code that is causing you problems?

  3. #3
    SitePoint Member
    Join Date
    Nov 2013
    Location
    cornwall uk
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Guido,
    The code for one of the form parts that works is

    <input name="From" type="text" id="From" size="30" />

    The one that doesn't is

    <textarea name="Comments" id="Comments" cols="30" rows="5"></textarea>

    Hmm, I've changed some thing since I first looked and I can now see it's completely different. I spent a couple of hours messing with it yesterday.
    Thanks for the reply
    Neil

  4. #4
    SitePoint Enthusiast zakelijk's Avatar
    Join Date
    Oct 2012
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is your form action file? SELF or is it extended to an send.php? You should check that file and add it there as well..

  5. #5
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Madison, WI
    Posts
    2,805
    Mentioned
    34 Post(s)
    Tagged
    2 Thread(s)
    It may not be that simple.

    If am understanding correctly the the fields for comment is there , you can fill it and submit the form, but the comment is not added afterward, am I correct? Remember a form is a PROCESS. Just because you ad the element doesnt mean the data is stored in in the data base. So you will need to alter your database where your other info is stored, and ad a script to add the value of your comment field, and you may need to teak the file wich displays comment read the DB and display whatever is stored in the comments field of the DB.

  6. #6
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,657
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    The form processing mumbo jumbo is a bit of a complicated monster. I have it all if you want. Just let me know.

  7. #7
    SitePoint Member
    Join Date
    Nov 2013
    Location
    cornwall uk
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, as you say it's very complicated. I've managed to contact the guy who built the site, I run holiday cottages and did a swap for the build a few years ago. He's guiding me through a little though he built it with HTML so I'm trying to drop bits of code in to tell it to send the info to my email address.
    The form is to allow comments to be made when making a booking request and all the other info is getting through except the form I've added. If anyone's interested the site is www.trewithen.com
    Thanks for all the replies
    Neil

  8. #8
    SitePoint Member
    Join Date
    Nov 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What script is this form submitting to? If you can locate that script, open it up and include the comments field in the body of the message.

    That should do it

  9. #9
    SitePoint Enthusiast zakelijk's Avatar
    Join Date
    Oct 2012
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dresden_phoenix View Post
    It may not be that simple.

    If am understanding correctly the the fields for comment is there , you can fill it and submit the form, but the comment is not added afterward, am I correct? Remember a form is a PROCESS. Just because you ad the element doesnt mean the data is stored in in the data base. So you will need to alter your database where your other info is stored, and ad a script to add the value of your comment field, and you may need to teak the file wich displays comment read the DB and display whatever is stored in the comments field of the DB.
    Yes, you're right... i interpreted the question wrong... i thought he just mentioned a contact form... but it's a comment form... that changes everything... then you would need a database to store your comments... and you have to add a column in your table as well...

    Ughh then we only could help if you give a lot more code and the infrastructure of your database table.


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
  •