reset button does not reset the data in the form
I added a reset button
<input type="reset" value="Reset Form">
but the form does not reset. Why?
I added a reset button
<input type="reset" value="Reset Form">
but the form does not reset. Why?
I added phone number to the standard email contact form. It worked. Then I added a phone nuy=umber field. It will edit that there is data in the field but will no longer submit the email and gives no error in return. please look at the from and tell me why.
thanks
form is at: contact.php
I can't currently browse the page... looks like you may have taken the page down?
contact.php is the form and thankyou.php is the response. It is no longer connected to the site as client wanted it down since it was not working.
the reset does not work, and it will not submit to the thankyou. the errors also do not show for missing fields.
It would have been really nice if the documentation were more thorough on adding fields and it the example already had phone and address, as well as first and last name since more forms will need this information.
The reset form button seems to work like a standard reset button. It resets to the default values. If you had filled out the form it resets the defaults so that reset form will actually reset to the values you had entered previously.
It looks like lots of things aren't working right both client and server validation. I'm afraid I would start over and take it one step at a time. I think a lot of things may be out of place at this point. If you take it one step at a time and ask questions and point out what you did to cause errors or problems as they arise I can try to explain your way through them.
I have already started over 5 times. The initial values are blank so why does it save the data on the reset? It does not do that on other forms I have created, they return to blank.
The form works as long as I do not add anything to the form. The only 2 things I added are the reset button and the phone number. Once the phone number was added the form stopped working. There are only a few changes for the Phone_Number.
Probably the difference is that you have not used server side validation before in those other forms. Server Validation uses session variables to retain the previously entered values so that the user can start over from the form they had filled out when a particular field fails validation.
If you don't want it to retain values then you can set the value of the form elements to always be blank by default, or use javascript to reset the form to blank instead of using a standard form reset button. The standard form reset button is in fact working exacty as a standard form reset button should work in a browser.
Really once you get client validation working properly it will probably appear to work as you want since the client validation will catch all of th errors sever validation won't have to and the reset button will work as you expect. This is a result of the server validation running because you client validation is throwing an error.
Simply adding a form element to a working page will not break it. When you are making changes, test your changes as you make them. If things break, ctrl+z to undo and keep a working copy of the page. Having a working backup will help you analyze what you actually did to cause problems in the first place and then you will know exactly what you did to cause the error.
In this case the current error was actually caused when you removed the CAPTCHA. You failed to remove the code in the onSubmit event of the form validating that field:
WAValidateRQ(document.emailContact.Security_code,'- Please enter the text as it appears in the image above',document.emailContact.Security_code,0,false,'text');
That code is now causing errors and the client validation is not able to run at all as a result. This has nothing to do with the phone number field which is why you were pulling your hair out trying to find something wrong with the phone number field.
there was another link I forgot to remove. Everything now works.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.