Viewing 5 replies - 1 through 5 (of 5 total)
  • Not too sure why you wouldn’t use a plugin but if learning ajax is the reason then here’s a search that might get you started:

    http://www.google.com/search?q=wordpress+using+ajax+jquery+forms

    Good Luck.

    And if you want to turn your form into a plugin look at this:
    http://ocaoimh.ie/2008/11/01/make-your-wordpress-plugin-talk-ajax/

    Other resource:
    AJAX_in_Plugins

    mmm… another solution is to use google docs (the spreadsheet solution) – to create and embed a feedback form.

    mayoosuf have a look at the comment by ianstapleton on this topic http://ww.wp.xz.cn/support/topic/209747 it worked for me.

    Thread Starter mayoosuf

    (@mayoosuf)

    Thank you every one, i made it , but i don’t think its an ultimate solution, hmm you guys also have a look and give me your feedbacks, because, i want to learn more and more.

    actually i did’t do any big changes, only few parts, now im thinking of enhancing the code by using a Switch Case

    http://shums.info/demo/

    the code is i have written in the template page is

    <?php
    /**
    * @package WordPress
    * @subpackage Default_Theme
    */
    /*
    Template Name: contact form
    */
    ?>

    <?php get_header(); ?>

    <body id="contactform">
    <div id="container">
    <?php
    if(isset($_POST['submitted'])) {
    if($_POST['emailTo'] == '') {
    $emailToError = 'You forgot to enter the email address to send to.';
    } else if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$", $_POST['emailTo'])) {
    $emailToError = 'Enter a valid email address to send to.';
    }
    if($_POST['emailFrom'] == '') {
    $emailFromError = 'You forgot to enter the email address to send from.';
    } else if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$", $_POST['emailFrom'])) {
    $emailFromError = 'Enter a valid email address to send from.';
    }

    if($_POST['subject'] == '') {
    $subjectError = 'You forgot to enter the subject.';
    }

    if($_POST['message'] == '') {
    $messageError = 'You forgot to enter the message.';
    }

    if(!isset($emailToError) && !isset($emailFromError) && !isset($subjectError) && !isset($messageError)) {
    include(TEMPLATEPATH.'/sendEmail.php');
    include(TEMPLATEPATH.'/thanks.php');
    }
    }

    ?>
    <form action="<?php echo get_option('siteurl'); ?>/sendemail.php" method="post" id="sendEmail">
    <h1>Send An Email</h1>
    <p class="alert">* All fields are required</p>
    <ol class="forms">

    • <label for="emailTo">To</label><input type="text" name="emailTo" id="emailTo" value="<?= $_POST['emailTo']; ?>" /><?php if(isset($emailToError)) echo '<span class="error">'.$emailToError.'</span>'; ?>
    • <label for="emailFrom">From</label><input type="text" name="emailFrom" id="emailFrom" value="<?= $_POST['emailFrom']; ?>" /><?php if(isset($emailFromError)) echo '<span class="error">'.$emailFromError.'</span>'; ?>
    • <label for="subject">Subject</label><input type="text" name="subject" id="subject" value="<?= $_POST['subject']; ?>" /><?php if(isset($subjectError)) echo '<span class="error">'.$subjectError.'</span>'; ?>
    • <label for="message">Message</label><textarea name="message" id="message"><?= $_POST['message']; ?></textarea><?php if(isset($messageError)) echo '<span class="error">'.$messageError.'</span>'; ?>
    • <li class="buttons"><button type="submit" id="submit" value="no">Send Email »</button><input type="hidden" name="submitted" id="submitted" value="true" />

      </form>
      <div class="clearing"></div>
      </div>
      <?php get_footer(); ?>

      please give me your code enhancement teq’s

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘How to make a custom feedback form without using a plugin?’ is closed to new replies.