Viewing 2 replies - 1 through 2 (of 2 total)
  • Probably not a plugin at all, but simple PHP form. I use something similar on my “contact” page:
    <form method="POST" action="/blog/contact-form.php">
    Name:
    <input type="text" name="name" size="50"/>
    Email:
    <input type="text" name="email" size="50"/>
    Comment:
    <textarea name="message" rows="10" cols="50"></textarea>
    <input type="submit" name="Send" value="send"/>
    </form>

    Then contact-form.php handles the actual submission, and properly deals with errors:

    <?php
    require_once('./wp-blog-header.php');
    $error = "";
    $name = (isset($_POST['name'])) ? $_POST['name'] : '';
    $email = (isset($_POST['email'])) ? $_POST['email'] : '';
    if ('' == $name) {
    $error = "You need to supply a name!";
    } elseif ( ('' == $email) || (! is_email($email)) ){
    $error = "You need to supply a valid email address!";
    } elseif ('' == $_POST['message']) {
    $error = "You didn't say anything!";
    }
    if ('' == $error) {
    $headers = 'From: "' . $name . '" <' . $email . '>';
    mail('[email protected]', 'Message for you, sir!', stripslashes($_POST['message']), $headers);
    }
    // now we say thanks, or explain the error message
    get_header();
    get_sidebar();
    echo "<div id='content' class='narrowcolumn'><div class='post'>";
    if ('' != $error) {
    echo "<h3 class='storytitle'>Whoops!</h3>";
    echo "There seems to have been an error with your submission:
    ";
    echo "<p style='color: #B84A00; text-align: center;'>" . $error . "
    ";
    echo "Would you care to try again?
    ";
    } else {
    echo "<h3 class='storytitle'>Thanks!</h3>";
    echo "Your message has been sent. I'll read it just as soon as I can.
    ";
    }
    echo "</div></div>";
    get_footer();
    ?>

    It should be trivial to expand the above to include the details you require.

    Thread Starter Enigma

    (@enigma)

    Thank you so much. Appreciated. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Application form’ is closed to new replies.