Multiple forms

Multiple forms

how todo a mutliple form with this function:

  1. $(function() {
    $(".button").click(function() {

    var name = $("input#name").val();
    if (name == "") {
    return false;
    var dataString = 'name='+ name;

    type: "POST",
    url: "/mailer.php",
    data: dataString,
    success: function() {
    $('#contact_form').html("<div id='message'></div>");
    $('#message').html("<h2>Contact Form Submitted!</h2>")
    .append("<p>We will be in touch soon.</p>")
    .fadeIn(1500, function() {
    $('#message').append("<img id='checkmark' src='images/check.png' />");
    return false;


  1. <div id="contact_form1">
    <form name="contact" method="post" action="">
    <label for="name" id="name_label">Name</label>
    <input type="text" name="name" id="name" size="30" class="text-input" />
    <label class="error" for="name" id="name_error">missing!</label>
    <input type="submit" name="submit" class="button" id="submit_btn" value="Send" />