Page 1 of 1

Clear Form

Posted: Sat Jun 26, 2010 3:42 pm
by gazzieh
Hi

I have created a new form for adding a new user record to the database. The issue I am having is probably an easy one but I cannot see woods for trees:

The form loads and the last name input as well as the first password input both show the current user's details in there (password being masked). Clearly I do not want this to happen and can only assume it is pulling the data from the current session variables but I cannot see how or why; and therefore how to stop this from happening.

The base code is below:

Code: Select all

<form name="adduser" method="post" action="">
                        	<table>
                            	<tr>
                                	<td>Username</td>
                                	<td><input type="text" name="txtUsername" id="txtUsername"></td>
      							</tr>
                            	<tr>
                                	<td>First/Last Name</td>
                                	<td><input type="text" name="txtFirst" id="txtFirst">&nbsp;<input type="text" name="txtLast" id="txtLast"></td>
                            	</tr>
                                <tr>
                                	<td>Password</td>
                                	<td><input type="password" name="txtPassword" id="txtPassword"></td>
                            	</tr>
                                <tr>
                                	<td>Retype Password</td>
                                	<td><input type="password" name="txtPassword2" id="txtPassword2"></td>
                            	</tr>
                        	</table>
                            <p align="center">
				            	<input type="reset" name="Reset" id="reset_btn" value=" ">
                                <input type="submit" name="Submit" id="saveuser_btn" value=" ">
				        	</p>
						</form>

Re: Clear Form

Posted: Sat Jun 26, 2010 5:55 pm
by requinix
That's not enough to diagnose the problem. Either
a) There's some templating/framework process handling this, or
b) You're reloading the page - which may preserve form details previously entered

Re: Clear Form

Posted: Sun Jun 27, 2010 2:48 am
by gazzieh
Didn't think it would be. Sorry. :o)

I can discount a re-load issue since the data is there by default; I have not even tried to enter user data yet.

I'm curious how the form is pre-populated anyway and where it derives it's initial state data from since the input names are unique to this form, the form name is unique and I have, as of yet, not used the form.

Weird!

The problem with this fault is I do not even know where to begin to isolate out the relevant information for others to help offer a solution.