If I make a website with the form on it, I want one of the form fields to be filled so that I can change it when I what.
<input type="text" name="field1" value="Here whatever you want displayed by default" /> <textarea name="field2">Here whatever you want displayed by default</textarea>
. EDIT HADNT SEEN THE ABOVE POST BUT HAVE GIVEN JAVASCRIPT SOLUTION AS WELL. Are you refering to for example on my website i have prepopulated form fields which is simply done with some javascript as you can see here http://www.areol.co.uk/quote/ What i did was simply have a value for each input field which you can see on mines would be 'Enter Your Name' HTML EXAMPLE -- <input type="text" class="validate[required,custom[onlyLetter]] focusField" name="name" id="name" value="Enter Your Name"> Code (markup): JAVASCRIPT EXAMPLE -- I am no javascript expert in actual fact my knowledge is limited but what this is doing is simply adding a class .idleField to each input with an input type of text. On click ( focus ) the class .idleField is removed and replaced with .focusField. In other words what its doing is displaying all fields values and when you click on a field it then disappears and is replaced by your text. If no text is entered and you click on another field the original value ie 'Enter Your Name' will reappear $(document).ready(function() { $('input[type="text"]').addClass("idleField"); $('input[type="text"]').focus(function() { $(this).removeClass("idleField").addClass("focusField"); if (this.value == this.defaultValue){ this.value = ''; } if(this.value != this.defaultValue){ this.select(); } }); $('input[type="text"]').blur(function() { $(this).removeClass("focusField").addClass("idleField"); if ($.trim(this.value) == ''){ this.value = (this.defaultValue ? this.defaultValue : ''); } }); }); Code (markup): I hope this helps you and anyone else