PHP Scripting Forums » Discuss our Web Development Tutorials

contactform issues

(5 posts)
Please support us by buying these products:

  1. hey!
    im busy with implementing the contact form as in the tutorial. Everythings works fine excepts 2 issues:

    1) The form clears all the fields(the fields wich have been filled out) afer submitting when at least 1 field is empty and gives the error msg....
    I tried some things with putting a value="" item to the form and giving it the $from , $email etc but no results...

    2)Olaf, How did you get this overview of the form fields after summitting the form succesfully?

    please help me out.

    Vincent

    Posted 3 months ago #
  2. what is the html for your form?

    Posted 3 months ago #
  3. The html, it´s inside the var $form:

    $form = '<form id="cform">
                <div>
                  <label for="name">Name</label>
                  <input style=" border:1px solid '.$color.'" name="name" type="text" id="name" size="25" maxlength=30 />
                </div>
                <div>
                  <label for="email">E-mail</label>
                  <input style=" border:1px solid '.$color.'" name="email" type="text" id="email" value="" size="25" maxlength=30 />
                </div>
                <div>
                  <label for="msg">Message</label>
                  <textarea style=" border:1px solid '.$color.'" name="msg" id="msg" cols="45" rows="5" ></textarea>
                </div>
                <div>
                <input style=" border:1px solid '.$color.'" class="button" type="button" id="subbtn" value="Submit" onclick="xajax_myFunction(xajax.getFormValues(\'cform\'));" />
                </div>
              </form>';

    In the tutorial problem 1 is also occurring..

    Posted 3 months ago #
  4. Hi,

    it looks like that the page reloads.
    do you get a message from the script (about the empty fields)?

    maybe you post/PM the url?

    Posted 3 months ago #
  5. Here is an upgrade to fix the empty fields:

    http://www.finalwebsites.com/forums/topic/phpxajax-contact-form-upgrade

    Posted 3 months ago #

RSS feed for this topic

Reply

You must log in to post.