1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Installing contact form in wordpress

Discussion in 'HTML & Website Design' started by offthedome, Aug 19, 2013.

  1. #1
    Although I know (or assume) that there are plugins to add contact forms to a wordpress site, I would like to add my own code to fit with my own contact form generator script at addressmunger.com.

    I figure I can do what I did with my testimonials page, which is create it completely from scratch and just make it look like my wordpress site, and then just link to it. But I want to know how to do it within wordpress, so that, for example, I can edit my wordpress theme and have those changes carry on to my contact us form.

    The page that isn't working quite right is http://www.juantutors.com/contact-us/ . The CAPTCHA image doesn't appear and I don't know how to make the page work.
    Solved! View solution.
    Last edited: Aug 19, 2013
    offthedome, Aug 19, 2013 IP
  2. fmOzilla

    fmOzilla Member

    Messages:
    44
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #2
    Have you edit your theme?which theme u are using?
    fmOzilla, Aug 19, 2013 IP
  3. offthedome

    offthedome Active Member

    Messages:
    437
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    75
    #3
    That's all me and CSS on the twentythirteen theme. No added theme installed.
    offthedome, Aug 19, 2013 IP
  4. #4
    Best way in your case (in my view) is to create a new template page in the theme, which will have all the processing code and all the form code, with condition that if a form is submitted apply the processing code, else show the form itself.
    Where ever you want to put that contact form, say in that contact-us page apply that template.
    rajku, Aug 19, 2013 IP
    offthedome likes this.
  5. Oranboard

    Oranboard Active Member

    Messages:
    40
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    55
    #5
    Is that code postet on an wp page? I think there is a problem about the security reasons about wp. You need to activate, java or php to post in pages with a plugin. Or is my idea wrong?
    Oranboard, Aug 20, 2013 IP
  6. offthedome

    offthedome Active Member

    Messages:
    437
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    75
    #6
    I've solved the problem. Creating two templates did the job.
    1. I created a template called captcha, deleted the entirety of the page except for the top line that names the template, and then pasted the code there.
    2. Instead of cutting and pasting the page into the textarea in wordpress, I deleted <?php the_content(); ?> And pasted the form there. Then I created a contact us page left the text area blank, and gave it this new template.
    Yey! The page works!
    offthedome, Aug 20, 2013 IP